<div class="gmail_quote">On Fri, Sep 9, 2011 at 3:56 AM, Ben Short <span dir="ltr"><<a href="mailto:ben@benshort.co.uk">ben@benshort.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>The following is my rsyncd.conf file in my home directory on the server.</div></blockquote><div><br></div><div>Since you are running rsync as root, the config file used will be /etc/rsyncd.conf.  I assume that config file is simply missing the post-xfer exec setting, unlike the one in the home dir.  If you want to use a different config file, you'd have to pass in the --config=/some/rsyncd.conf option to remote rsync.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>I've added the following to the sudoers file so that the rsync daemon runs as root and can preserve the file permissions.</div><div><br></div><div>bs ALL= NOPASSWD:/usr/local/bin/rsync</div></blockquote><div><br>
</div><div>It would be safer to force the whole "rsync --server --daemon ." command via sudoers so that a non daemon-server rsync cannot be run as root.  You may also want to add a forced command to your ssh key in the authorized_keys file so that that particular ssh key can only be used to startup a root rsync server daemon.  If you go that route, you wouldn't need to use the --rsync-path option on the client (since you would force sudo as part of the command) and you could make the forced command specify any config file you like (if you want to switch from the default global config).</div>
<div><br></div></div>..wayne..<br>