question on permissions

Dave Dykstra dwd at
Tue Dec 4 09:05:12 EST 2001

On Mon, Dec 03, 2001 at 01:21:29PM -0800, Sri Ramkrishna wrote:
> I have a question regarding how rsync changes ownership when syncing two
> areas.  Currently, I have this situation:
> I have two areas over a WAN, we are trying to mirror from one site to
> another.  One site is not controlled by us and has different unix
> groups.  
> When we copy one to the other, we are running rsync on an account that
> exists at both places (different UIDs though)  In one area we have no
> problems the groups/owners exist at both places.  However in another
> area, the owner exists but the group name does not.
> When we run rsync between the two we get a lot of chown errors.  Now
> this makes sense as some OSs (we are using HPUX 11) do not allow a
> person to change the ownership of a file.  However, we have another area
> where both the group and the ownership exist on both ends but we have no
> chown errors.  Can anybody explain this behavior?  In the end, the area
> still gets owned by the uid and gid of the rsync running on our end.
> Thanks,
> sri

Are you using rsync --daemon mode on one side?  There are several tricky
issues related to that, alluded to under the "--owner" option in the
rsync man page.

What user id are you doing the transfers under?

Also, rsync enforces bsd-style ownership and group semantics, regardless of
whether or not the underlying operating system permits more freedom with
chown and chgrp.  That means it won't allow doing a chown to another user
if you're not root, and the only groups it will allow a non-privileged
user to chgrp to are those which groups which the user belongs to.

- Dave Dykstra

More information about the rsync mailing list