报错日志/var/log/rsyncd.log发现错误
2014/07/02 21:18:16 [9374] auth failed on module backup_www from UNKNOWN (10.0.203.208): unauthorized user2014/07/02 21:18:23 [9375] name lookup failed for 10.0.203.208: Name or service not known2014/07/02 21:18:23 [9375] connect from UNKNOWN (10.0.203.208)
1.最开始想到是不是有谁动过rsync的主配置文件和用户认证文件发现一切正常
[backup_www] path = /backup_www_dir/read only = nolist = no auth users = web_rsyncsecrets file = /etc/rsyncd.secrets
2.又想到是否是权限问题(服务端权限为600)客户端权限也正常
[root@localhost /]# ll /etc/rsyncd.secrets-rw------- 1 root root 474 Jul 2 21:29 /etc/rsyncd.secrets
4.最后发现我们另一个同事在rsync主配置文件中多写了一条和backup_www相同的模块,只是用户和path不同
[backup_www] path = /backup_new_dir/read only = nolist = no auth users = www_rsyncsecrets file = /etc/rsyncd.secrets
另:如果模块相同还会出现这种情况
rsync: mkstemp ".hosts.FtFzWd" (in www) failed: Permission denied (13)