Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Arrrgh! rsync "chroot failed" error message!

2,066 views
Skip to first unread message

Vinny

unread,
Mar 7, 2006, 1:03:34 PM3/7/06
to
I'm baffled. I can't get this to work and I do not understand why.

Linux Fedora Core 4

my /etc/rsyncd.conf file:
uid = root
gid = root
use chroot = true
max connections = 4
pid file = /var/run/rsyncd.pid
syslog facility = daemon
read only = true
list = yes

[install]
path = /data02/install
exclude = ks pxelinux.cfg
comment = Fedora Install Path

my /etc/xinetd.d/rsync file:
service rsync
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
}


Directory Permissions off /:
drwxr-xr-x 5 root root 4096 Mar 7 12:42 data02
and under /data02 I have:
drwxr-xr-x 8 root root 4096 Mar 7 09:53 install

>From another machine:
# rsync myserver::

yields:

install Fedora Install Path

So far so good. But then:

# rsync myserver::install

@ERROR: chroot failed
rsync: connection unexpectedly closed (0 bytes received so far)
[receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(420)


Now, if I change the path in the rsyncd.conf file to point to /tmp, I
get:

drwxr-xr-t 69632 2006/03/07 12:43:32 .
drwx------ 4096 2006/02/27 21:46:40 gconfd-gssds
drwxr-xr-x 4096 2006/02/28 13:57:31 hsperfdata_grjeee

The "." entry is interesting, because /tmp shows otherwise as a+rwxt in
the permissions.

The only thing I can see different between /data02/install and /tmp is
that /tmp is a directory file mounted on the root filesystem, whereas
/data02 is simply a directory on the root filesystem, which, during
boot up, I perform a mount of a hard disk to (e.g. "mount /dev/hdb1
/data02")

Is there a bug and/or limitation which requires rsync to work solely on
the root filesystem, or is it incapable of traversing hard disk
mount-points onto secondary disks? It seems I can change the directory
in rsyncd.conf to any directory on the root filesystem and have it work
file, but when I try to point the entry to a directory on another
filesystem, it doesn't work.

Michael Heiming

unread,
Mar 7, 2006, 5:51:43 PM3/7/06
to
In comp.os.linux.networking Vinny <ten...@yahoo.com>:

> I'm baffled. I can't get this to work and I do not understand why.

> Linux Fedora Core 4

[ rsync problems ]

Try using rsync through "ssh", you don't need a running rsyncd
server or alike ssh will do anything for you you just need the
rsync binary on the remote host. 'rsync -e ssh ...'

And see if this works better, check the documentation for
examples ('man rsync'). There's no problem traversing filesystems
if permissions allow that.

Good luck

[..]

--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvp...@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 288: Hard drive sleeping. Let it wake up on
it's own...

Vinny

unread,
Mar 8, 2006, 9:49:00 AM3/8/06
to
Thanks. When I point the directory to /data02/install and use rsync -e
ssh everything works fine.

Any thoughts why it doesn't work the other way? Is it, as I suspect, a
filesystem traversal issue?

Michael Heiming

unread,
Mar 8, 2006, 11:15:23 AM3/8/06
to
In comp.os.linux.networking Vinny <ten...@yahoo.com>:

> Thanks. When I point the directory to /data02/install and use rsync -e
> ssh everything works fine.

Glad to hear you got things working.

> Any thoughts why it doesn't work the other way? Is it, as I suspect, a
> filesystem traversal issue?

No it isn't, rsync unless you tell it do so doesn't care about
filesystem traversal, those are transparent to applications as
anything is mounted below / on unix systems. This isn't doze.

BTW
Please try below URL(s) before answering, most people aren't
using a browser here to read/write, this is usenet.

http://www.safalra.com/special/googlegroupsreply
http://cfaj.freeshell.org/google

--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvp...@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'

#bofh excuse 372: Forced to support NT servers; sysadmins quit.

0 new messages