rsync error: error starting client-server protocol (code 5) at main.c(1530) [receiver=3.0.6]

同步一个重要的数据目录,自己之前安装过,现在做起来轻车熟路,只需要简单回顾一下。

之前安装的笔记:http://blog.csdn.net/huoyunshen88/article/details/17922533
[root@test-1 ~]# rsync -avz --password-file=/etc/rsync.password [email protected]::backup /usr/local/sonatype-work/
password file must not be other-accessible
continuing without password file
Password:
@ERROR: auth failed on module backup
rsync error: error starting client-server protocol (code 5) at main.c(1530) [receiver=3.0.6]

运行时还是发现有错误,遇到问题查找资料,给了一些提示:
http://bbs.chinaunix.net/thread-3675077-1-1.html
http://kerry.blog.51cto.com/172631/734087
http://loveyan.blog.51cto.com/829079/713816
http://blog.sina.com.cn/s/blog_6dc4dbed0100w2ub.html

总结一下:
这个1530错误根据网上的资料说是权限问题:
两种解决方法复制下来方便查看:
1.@ERROR: daemon security issue -- contact admin
rsync error: error starting client-server protocol (code 5) at main.c(1530) [sender=3.0.6]
原因:同步的目录里面有软连接文件,需要服务器端的/etc/rsyncd.conf打开use chroot = yes。掠过软连接文件。


2.远程rsync服务器的帐户密码文件的权限必须为600,例如,你在rsyncd.conf中设置了secrets file = /etc/rsyncd/rsync.password
针对这个1530的错,网上有说是密码文件权限问题,修改了还是不生效。
[root@test-2 ~]# chmod 600 /etc/rsync.password

最后在仔细查看配置文件rsync.conf的时候,发现auth users = test,修改为auth users = root,问题解决。

uid = nobody
gid = nobody
user chroot = no
max connections = 200
timeout = 600
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsyncd.lock
log file = /var/log/rsyncd.log
[hadoop]             #定义要同步的模块
path=/opt/chd4.5/    #定义要同步备份的目录
ignore errors
read only = no
list = no
hosts allow = 192.168.21.0/255.255.255.0
auth users = test   
secrets file = /etc/rsyncd.password


你可能感兴趣的:(linux)