这里是普通文章模块栏目内容页
rsync @ERROR: chdir failed 解决办法!
配置好的rsync突然不能用了,出现以下错误

@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