一,查看本地centos的版本:
[root@localhost lib]# cat /etc/redhat-release CentOS Linux release 8.1.1911 (Core)
说明:架构森林是一个专注架构的博客,地址:https://www.cnblogs.com/architectforest
对应的源码可以访问这里获取: https://github.com/liuhongdi/
说明:作者:刘宏缔 邮箱: [email protected]
二,报错一:
@ERROR: access denied to wwwroot from localhost (127.0.0.1) rsync error: error starting client-server protocol (code 5) at main.c(1657) [Receiver=3.1.3]
解决:
说明:rsync配置文件中,wwwroot这个区域没有放开当前的ip,
添加ip后重启服务
二,报错二:
@ERROR: auth failed on module wwwroot rsync error: error starting client-server protocol (code 5) at main.c(1657) [Receiver=3.1.3]
解决:
验证出错,原因是密码错误,检查客户端的密码文件是否正确
此处注意:服务端的密码需要写成: pusher:123456,格式是 用户名:密码,
而客户端的密码是: 123456,也就是密码文件中不需要用户名
三,报错三:
[root@localhost source]# rsync --progress -artuz -R "./abc.txt" pusher@127.0.0.1::wwwroot --password-file=/data/rsync/conf/client.pass sending incremental file list rsync: read error: Connection reset by peer (104) rsync error: error in socket IO (code 10) at io.c(785) [sender=3.1.3]
解决:
上传文件时连接被重置,是因为没有写权限,
修改服务端的配置文件,增加写的权限
[root@localhost source]# vi /etc/rsyncd.conf
说明:
增加内容:
read only = no