how to change owner of dest.

Wayne Davison wayned at samba.org
Mon Nov 7 15:58:34 GMT 2005


On Mon, Oct 24, 2005 at 12:44:01PM +0800, Adrian Mak wrote:
> the files owner of remote host is uid mary, after executed rsync for
> file synchronization, the files owner of local host will be uid peter,
> instead of mary

If you are copying files via remote-shell rsync, simply login to the
destination host as mary and that will be the default owner for the
files.  Alternately, if the destination rsync is running as root, rsync
will attempt to preserve the owner (with the -o, --owner option), in
which case you need to make sure that username "mary" exists on the
destination so that rsync can match it up.  Also, if you are using an
rsync daemon with chroot enabled, you'll need to either make sure that
mary has an identical user-ID number, or you'll need to place all the
necessary user-identification files (e.g. /etc/passwd) into the chroot
area for rsync to be able to match up the names and come up with the
right local id number (or you can simply disable chroot).

..wayne..


More information about the rsync mailing list