Rsync configuration problem

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
slyt
Posts: 2
Joined: 2008/06/16 12:02:11
Location: PL

Rsync configuration problem

Post by slyt » 2008/06/16 12:12:52

CentOS v5.1 x64

I have rsync configuration problem and I can not find the error.

rsyncd.conf:
[quote]
max connections = 2
motd file = /etc/rsync.motd
log file = /var/log/rsync.log
pid file = /var/run/rsync.pid
lock file = /var/run/rsync.lock
timeout = 300

[01]
path = /home/rsync/rc
comment = Comment1
read only = yes
list = yes
uid = nobody
gid = nobody
use chroot = true
auth users = rc
secrets file = /etc/rsyncd.secrets

[02]
path = /home/rsync/rozl
comment = Comment2
read only = yes
list = yes
uid = nobody
gid = nobody
auth users = rozliczenia
secrets file = /etc/rsyncd.secrets
[/quote]

Rsync is started by xinetd. I have appriopriate entry in /etc/services.

Listing /home:
[quote]
drwx------ 2 root root 16384 mar 21 09:04 lost+found
drwxr-xr-x 4 root root 4096 cze 14 12:59 rsync
[/quote]

Listing /home/rsync:
[quote]
drwxr-xr-x 4 root root 4096 cze 14 13:11 rc
drwxr-xr-x 3 root root 4096 cze 14 13:11 rozl
[/quote]

When I enter:
[quote]
rsync rsync://rc@localhost
01 Comment1
02 Comment2
[/quote]

Then:
[quote]
rsync rsync://rc@localhost/01
Password:
@ERROR: chroot failed
rsync error: error starting client-server protocol (code 5) at main.c(1296) [receiver=2.6.8]
[/quote]

The password I enter is correct otherwise the error would be "auth failed...".

Please help :),

Best regards,
SlyT

thinkmassive
Posts: 1
Joined: 2008/06/17 20:08:40

Re: Rsync configuration problem

Post by thinkmassive » 2008/06/17 20:58:27

I am experiencing the same issue on CentOS release 5 (Final). My rsync configuration is essentially the same so I won't bother posting it again. The /etc/xinetd.d/rsync that I am using is the default, with the exception of "disable = no". I can confirm that using an invalid password results in "@ERROR: auth failed on module ".

Also, setting "use chmod = false" in /etc/rsyncd.conf results in "@ERROR: chdir failed" even though the directory exists and has permissions 755.

This must be a problem in the way we're calling rsync from xinetd because running it as a standalone daemon ("rsync --daemon") solves the problem. I consider this a temporary fix, but it's better than nothing. Connecting through a shell, via "rsync -e ssh ...", also works fine but this is not an option for my particular case because I am using a built-in backup system on a NAS unit that I refuse to modify because it works fine for my other systems.

slyt
Posts: 2
Joined: 2008/06/16 12:02:11
Location: PL

Re: Rsync configuration problem

Post by slyt » 2008/06/18 13:19:20

@thinkmassive
Thank you very much for your answer. It helped me much.

Post Reply