rsync: connection unexpectedly closed (0 bytes received so far)

Matt McCutchen matt at mattmccutchen.net
Tue Mar 23 16:57:03 MDT 2010


On Tue, 2010-03-23 at 15:50 -0700, Bruce Korb wrote:
> Without the "-e ssh" I was getting no response at all.  tcpdump wasn't showing
> any port 873 packets, but port 22 was getting through the vyatta virtual switch.
> So, "-e ssh", though I'd actually like to get the daemon working
> correctly through
> its 873 port -- as long as it will use a secure encrypted tunnel.

The rsync daemon protocol on port 873 does not support encryption or
integrity protection, so an rsync daemon over ssh may actually be just
what you need.

> First, I need
> the data moved around though.
> 
> I did have it in the user home directory:  /home/rsync-acct/rsyncd.conf
> and it points to PID and log files in that directory, too.  So, can you guess
> where I went south?  :)  thanks so much!  Regards, Bruce
> 
> $ ls -l
> total 24
> drwxrwxrwx 2 rsync-acct rsync-acct 4096 2010-03-23 15:47 acct-project
> drwxr-xr-x 2 rsync-acct rsync-acct 4096 2010-03-23 14:07 bin
> drwxrwxrwx 3 rsync-acct rsync-acct 4096 2010-03-23 12:03 data
> -rw-r--r-- 1 root         root         2451 2010-03-23 15:30 log.txt
> -rw-r--r-- 1 rsync-acct rsync-acct 1902 2010-03-23 13:57 rsyncd.conf
> -rw-rw-rw- 1 rsync-acct rsync-acct    0 2010-03-23 13:58 rsyncd.lock
> drwxr-xr-x 3 rsync-acct rsync-acct 4096 2010-03-18 10:57 var
> 
> $ cat rsyncd.conf
> use chroot = yes
> max connections = 4
> log file   = /home/rsync-acct/log.txt
> lock file  = /home/rsync-acct/rsyncd.lock
> pid file   = /home/rsync-acct/var/run/rsyncd.pid
> fake super = yes
> transfer logging = yes
> 
> [doc]
>         path       = /home/rsync-acct/acct-project
>         comment    = doc project
>         read only  = yes
>         use chroot = yes
>         filter     = /gdoc/***

Ah.  You have "use chroot = yes".  Most operating systems don't let
unprivileged users call chroot, so that would result in an error.  An
error message should be written to the log file, but it looks like the
log file isn't writable by the "rsync-acct" user either.

-- 
Matt



More information about the rsync mailing list