doushuo2834 2014-06-25 06:52
浏览 87
已采纳

rsync没有权限由php触发

I'm trying to sync two local folders by triggering rsync from a php script. The following error is produced:

rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]
rsync: recv_generator: mkdir "/Library/xxxxxxx" failed: Permission denied (13)

How do I give php/apache permissions to trigger the rsync process?

Thanks!

  • 写回答

2条回答 默认 最新

  • dongyou26216708 2014-06-25 06:56
    关注

    The problem is that you do not have permissions to create directory.

    Use chown on directory /Library and assign to the same user that is executing Apache server, and give permission of 755 to all files and directories, for example, if the user executing Apache is daemon:

    sudo chown daemon.daemon -R /Library
    sudo chmod 755 -R /Library
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突