Rsync ERROR: auth failed on module解决方法
技术  /  管理员 发布于 7年前   322
示意图:
Rsync 版本
[root@mail video]# rsync Cversion
rsync version 3.0.6 protocol version 30
Copyright (C) 1996-2009 by Andrew Tridgell, Wayne Davison, and others.
Web site: rsync.samba.org
Capabilities:
64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, xattrs, iconv, no symtimes
rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.
服务器同步任务需求
服务器A与服务器B同步备份,这里只说明服务器A同步到服务器B,服务器B还原到服务器A。
考虑安全因素,使用普通用户进行同步。
使用cronjob,定时同步。
错误提示
错误发生在rsync 3.0.6版本,64位 CentOS5.5 系统。
首页这篇文章主要解决的错误是以下:
复制代码 代码如下:
@ERROR: auth failed on module ***
rsync error: error starting client-server protocol (code 5) at main.c(1503) [receiver=3.0.6]
*** 是你/etc/rsyncd.conf 中配置的模块,我这里用
复制代码 代码如下:
password file must not be other-accessible
continuing without password file
Password:
@ERROR: auth failed on module ***
rsync error: error starting client-server protocol (code 5) at main.c(1503) [receiver=3.0.6]
Rsync 配置
#vi /etc/rsyncd.conf
复制代码 代码如下:
uid = nobody
gid = nobody
max connections = 4
read only = true
#hosts allow = 202.207.177.180
hosts allow = *
transfer logging = true
log format = %h %o %f %l %b
log file = /var/log/rsyncd.log
slp refresh = 300
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsyncd.lock
[web]
path = /home/admin/public_html
comment = Mirror to Hk server
read only = true
list = false
auth users = lixiphp
[test]
path = /home/admin/domains/test
read only = false
auth users = lixiphp
secrets file = /etc/rsyncd.secrets
配置普通用户密码
复制代码 代码如下:[root@mail video]# vi /etc/rsyncd.secrets
格式为: username:password
复制代码 代码如下:rsync_user:rsyncofpass
设置权限为只读:
复制代码 代码如下:chmod 600 /etc/rsyncd.secrets
首次启动rsync
复制代码 代码如下:rsync Cdaemon Cconfig=/etc/rsyncd.conf
如果提示
复制代码 代码如下:failed to create pid file /var/run/rsyncd.pid: File exists
使用指令
rm -rf /var/run/rsyncd.pid
重启已经在运行的rsync
复制代码 代码如下:
[root@mail video]# ps -ef | grep rsync
root 27284 1 0 10:26 ? 00:00:00 rsync Cdaemon Cconfig=/etc/rsyncd.conf
root 30516 29986 0 18:35 pts/3 00:00:00 grep rsync
[root@mail video]# kill -9 27284
[root@mail video]# rsync Cdaemon Cconfig=/etc/rsyncd.conf
这样服务器A配置成功!
服务器B配置122 在
学历:一种延缓就业设计,生活需求下的权衡之选中评论 工作几年后,报名考研了,到现在还没认真学习备考,迷茫中。作为一名北漂互联网打工人..123 在
Clash for Windows作者删库跑路了,github已404中评论 按理说只要你在国内,所有的流量进出都在监控范围内,不管你怎么隐藏也没用,想搞你分..原梓番博客 在
在Laravel框架中使用模型Model分表最简单的方法中评论 好久好久都没看友情链接申请了,今天刚看,已经添加。..博主 在
佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 @1111老铁这个不行了,可以看看近期评论的其他文章..1111 在
佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 网站不能打开,博主百忙中能否发个APP下载链接,佛跳墙或极光..
Copyright·© 2019 侯体宗版权所有·
粤ICP备20027696号