标签:rsync 1053
搭建了一个rsync服务,客户测试的时候始终出现如下错误
rsync error: error starting client-server protocol (code 5) at main.c(1503)[receiver=3.0.6]
网上查看说是权限或者目录问题,仔细检查目录的确存在,且权限是600,密码正确。
[root@localhost data]# ll /etc/rsync.passwd
-rw------- 1 root root 12 Aug 28 16:16 /etc/rsync.passwd
查看错误日志有如下错误
2015/08/28 17:13:58 [3662] name lookup failed for 192.168.1.19: Name or service not known
2015/08/28 17:13:58 [3662] connect from UNKNOWN (192.168.1.19)
2015/08/28 17:14:02 [3662] auth failed on module lihui from unknown (192.168.1.19): missing secret for user "rsync_backup"
意思是 rsync_backup 用户在模块 lihui 上面验证失败。
查看服务端配置文件 /etc/rsyncd.conf
uid = rsync
gid = rsync
use chroot =no
max connections = 200 #同时连接的客户端
timeout = 300
strict modes = yes
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsyncd.lock
log file = /var/log/rsyncd.log
[lihui] #模块名称
path = /data/lihui/ #相当于共享目录
ignore errors #传输中忽略错误
read only = false #可读可写
list = false #不允许列表
hosts allow = 192.168.1.0/24
hosts deny = 0.0.0.0/0 #拒绝
auth users = rsync_backup # 虚拟用户,保存文件在rsync.password
secrets file = /etc/rsync.password
看了半天才发现配置文件中指定的密码文件写错了,把 secrtes file = /etc/rsync.passwd
保存,杀掉rsync 重启 rsync --daemon --config=/etc/rsyncd.conf 然后连接正常
本文出自 “linux运维--李辉” 博客,请务必保留此出处http://ealina.blog.51cto.com/2056366/1689377
标签:rsync 1053
原文地址:http://ealina.blog.51cto.com/2056366/1689377