@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]
原因及解决办法:
SELinux;
在centos中默认是不允许客户端同步服务端的,主要是SElinux它禁止了这个行为,要想同步就要修改SElinux的策略,用以下方法来解决:
setsebool -P allow_rsync_anon_write 1意思为允许客户端从服务端下载数据,或者完全禁止rsync受SElinux的保护,就使用下面命令来取消SElinux对rsync的保护:
setsebool -P rsync_disable_trans 1
setsebool -P rsync_client 1
getsebool -a|grep ftp
上一篇:centos下设置ssh连接时间
下一篇:linux cp不再询问直接覆盖