Arrrgh! rsync "chroot failed" error message!

Discussion in 'Linux Networking' started by Vinny, Mar 7, 2006.

  1. Vinny

    Vinny Guest

    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/
    syslog facility = daemon
    read only = true
    list = yes

    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
    # rsync myserver::


    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)
    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

    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

    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.
    Vinny, Mar 7, 2006
    1. Advertisements

  2. [ 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, Mar 7, 2006
    1. Advertisements

  3. Vinny

    Vinny Guest

    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?
    Vinny, Mar 8, 2006
  4. Glad to hear you got things working.
    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.

    Please try below URL(s) before answering, most people aren't
    using a browser here to read/write, this is usenet.
    Michael Heiming, Mar 8, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.