Steve Tucknott
2005-Nov-07 15:43 UTC
Rsync and permissions - rsync version 2.6.4 protocol version 29
What does rsync do with permissions? Using rsync -auvP ./* targetMachine:/targetDir I sometimes get an error/warning such as: chown GENERO/uk/reinsure/prod/rel/dbmodify.4gl : Operation not permitted The source file has owner/group stevet:dev and the target stevet:users The files are being rsync'd as user 'fyl' - fyl belongs to both dev and users group. The 'oddity' is that if the command rsync -auvPn is used to check before doing the actual copy, then the error/warning is not given - ie -auvPn potentially says that nothing needs to be done, but then the actual copy statement comes up with the chown message. Regards, Steve Tucknott -------------- next part -------------- HTML attachment scrubbed and removed
Wayne Davison
2005-Nov-07 22:48 UTC
Rsync and permissions - rsync version 2.6.4 protocol version 29
On Mon, Nov 07, 2005 at 03:45:14PM +0000, Steve Tucknott wrote:> chown GENERO/uk/reinsure/prod/rel/dbmodify.4gl : Operation not permitted > > The source file has owner/group stevet:dev and the target stevet:usersRsync is trying to change the group to match, and that is failing.> The files are being rsync'd as user 'fyl' - fyl belongs to both dev and > users group.Yes, but a non-root user can't change the group on a file that the transferring user doesn't own -- thus the error. If you touch the source file (changing its mtime) and let rsync update the file, the ownership will change from stevet to fyl, and the group will then be able to be updated. Alternately, run rsync as root on the receiving side.> The 'oddity' is that if the command rsync -auvPn is used to check > before doing the actual copyThat's not enough to see everything that will change, since rsync doesn't output permissions or group changes at level one verbosity unless -i was also specified (in which case -v isn't required). The --itemize-changes (-i) option is available in recent versions of rsync. ..wayne..