Rsync ERROR: auth failed on module解决方法

今天在两台服务器同步备份在用户权限上纠结了很多,主要关于这个问题网上的配置方法不一,源自rsync版本不一致,这里简单总结下,方便需要的朋友

示意图:


Rsync 版本

[root@mail video]# rsync –version
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

以上就是Rsync ERROR: auth failed on module解决方法的详细内容,更多请关注0133技术站其它相关文章!

赞(0) 打赏
未经允许不得转载:0133技术站首页 » 服务器