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

Matt McCutchen matt at
Tue Mar 23 17:23:29 MDT 2010

On Tue, 2010-03-23 at 16:15 -0700, Bruce Korb wrote:
> On Tue, Mar 23, 2010 at 3:57 PM, Matt McCutchen <matt at> wrote:
> >> $ ls -l
> ...
> >> -rw-r--r-- 1 root         root         2451 2010-03-23 15:30 log.txt
> Oops.  Fixed.  Still root owned, but mode is now 0666.
> > 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.
> Deleting the chroot line

"Yes" is the default, so you have to explicitly write "use chroot = no".
(Sorry, I should have mentioned that.)

> and changing the writable bits on the file had
> no visible effect.  Still nothing written to the log file and the client failure
> looks identical.  :(  Is there something more I can do on the server to
> get more diagnostics?

Weird!  You might check if the daemon is logging to syslog
(/var/log/messages) for some reason, as it will fall back to syslog if
it fails to open the log file, though I don't see why it would fail now
that you have fixed the permissions.  If that doesn't reveal anything,
try running the daemon under strace by passing
--rsync-path='strace -f -o ~/rsync.strace rsync' to the client.


More information about the rsync mailing list