rsync chdir failed rsync @ERROR: chdir failed 的解决办法
人气:0CwRsyncServer在windows服务器上遇到这样的问题:
@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1495) [rec
eiver=3.0.2]
权限问题:
1)新建一个目录比如, 进入 开始菜单>cwRsync Server>Prep a Dir for Upload, 选择D:\folder1 ,确定
2)右键点击folder1 文件夹, 进入 属性>安全, "添加"用户, 输入对象名称为Svcwrsync, 并将Svcwrsync的权限设置为 所有都允许。
提升用户权限:
如果安全性要求不是很高的情况下,目录较多可以将Svcwrsync提升为管理员权限,一定配置限制制定ip才能同步文件。
ps: 修改完rsyncd.conf, 要重启RsyncServer服务才能生效
原因三、检查目录是不是有问题,我这把就是d与e盘错了盘符导致无法同步
linux服务器下:
系统平台:RHEL5.3
客户机:
[root@test1 ~]# rsync -vzrtopg --progress --delete --password-file=/etc/rsyncd.pwd marsaber@10.10.10.3::backup /var/www/html
@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1296) [sender=2.6.8]
服务器日志(/var/log/rsyncd.log):
rsync: chdir /backup failed: Permission denied (13)
原因及解决办法:
SELinux;
setsebool -P rsync_disable_trans on
error总结:
@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1296) [receiver=2.6.8]
原因及解决办法:
这一般是在服务器端没有建立目录
或者是如果有开启SELinux只要执行一下命令
SELinux;
setsebool -P rsync_disable_trans on
切记: rsyncd.secrets的权限必须为600
(注意:这个安全设置很重要,如果不这样做客户机连接服务器时会提示:
password file must not be other-accessible
rsync error: some files could not be transferred (code 23) at main.c(1298) [generator=2.6.8]
@ERROR: auth failed on module
rsync: connection unexpectedly closed (102 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(165)
服务器端日志将出现错误提示:
2005/08/23 06:32:01 [8388] secrets file must not be other-accessible (see strict modes option)
2005/08/23 06:32:01 [8388] continuing without secrets file
2005/08/23 06:32:01 [8388] auth failed on module from documentserver
服务器端rsyncd.secrets (用户:密码)<用户必须是系统用户,密码尽量不要为系统用户密码>
客户端rsyncd.secrets (密码)<服务器端密码>
服务器和客户端的帐户密码都不可以有空格,否则会出现
@ERROR: auth failed on module
注意:
如果改变了端口号,一定要在/etc/services中把对应的端口改变才能正常运行
如rsync 873/tcp改成
rsync 3334/tcp即可
error3:
rsyncd.secrets的密码一定要和Rsync Server密码设定档案里的密码一样。如果不同(跟不是linux合法用户错误一样),将会出现如下的错误:
#rsync -azv /home rsync://root@192.168.1.107/hadoop --password-file=/home/rsyncd.secrets
@ERROR: auth failed on module hadoop
rsync error: error starting client-server protocol (code 5) at main.c(1296) [sender=2.6.8]
error4:
在client上遇到问题:
rsync -auzv --progress --password-file=/etc/rsync.pas root@192.168.133.128::backup /home/
rsync: could not open password file "/etc/rsync.pas": No such file or directory (2)
Password:
@ERROR: auth failed on module backup
rsync error: error starting client-server protocol (code 5) at main.c(1506) [Receiver=3.0.7]
遇到这个问题:client端没有设置/etc/rsync.pas这个文件,而在使用rsync命令的时候,加了这个参数--
password-file=/etc/rsync.pas
error5:
rsync -auzv --progress --password-file=/etc/rsync.pas root@192.168.133.128::backup /home/
@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1506) [Receiver=3.0.7]
遇到这个问题,是因为服务器端的/home/backup 其中backup这个目录并没有设置,所以提示:chdir failed
error6:
rsync: write failed on "/home/backup2010/wensong": No space left on device (28)
rsync error: error in file IO (code 11) at receiver.c(302) [receiver=3.0.7]
rsync: connection unexpectedly closed (2721 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at io.c(601) [generator=3.0.7]
磁盘空间不够,所以无法操作。
可以通过df /home/backup2010 来查看可用空间和已用空间
error7:
1、权限问题
类似如下的提示:rsync: opendir "/kexue" (in dtsChannel) failed: Permission denied (13)注意查看同步的目录权限是否为755
2、time out
rsync: failed to connect to 203.100.192.66: Connection timed out (110)
rsync error: error in socket IO (code 10) at clientserver.c(124) [receiver=3.0.5]
检查服务器的端口netstat –tunlp,远程telnet测试。
3、服务未启动
rsync: failed to connect to 10.10.10.170: Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(124) [receiver=3.0.5]
启动服务:rsync --daemon --config=/etc/rsyncd.conf
4、磁盘空间满
rsync: recv_generator: mkdir "/teacherclubBackup/rsync……" failed: No space left on device (28)
*** Skipping any contents from this failed directory ***
5、Ctrl+C或者大量文件
rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(544) [receiver=3.0.5]
rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(544) [generator=3.0.5]
6、xnetid启动(linux)
rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at io.c(759) [receiver=3.0.5]
加载全部内容