On Wed, Mar 12, 2003 at 01:26:34PM +1100, David Leach
wrote:> Hi there,
>
> rsync version 2.5.5 protocol version 26.
>
> I seem to be having some trouble using rsync to ignore permissions on a
> remote host when syncing back to a local host. I want it to listen to
> the umask of the user running the rsync locally. Eg:
>
> [remote host - I've touched a file made it 4750, etc, etc]
> hostb $ mkdir -p /data/rsync/temp
> hostb $ touch /data/rsync/temp/foo
> hostb $ chgrp blah /data/rsync/temp/foo
> hostb $ chmod 4750 /data/rsync/temp/foo
> hostb $ ls -lR /data/rsync/temp
> /data/rsync/temp:
> total 0
> -rwsr-x--- 1 rsync blah 0 Mar 12 13:14 foo
>
> [hosta, I run an rsync and get the following result]
> hosta $ ls -lR /data/rsync/temp
> /data/rsync/temp: No such file or directory
> hosta $ rsync -e ssh --rsync-path=/opt/local/bin/rsync -rtl
> hostb:/data/rsync/temp /data/rsync/
> hosta $ ls -lR /data/rsync/temp
> /data/rsync/temp:
> total 0
> -rwsr-x--- 1 rsync rsync 0 Mar 12 13:14 foo
>
> The group is lost, however the permissions are preserved. How can I
> prevent this happening? Thanks in advance!
There is a chmod-patch that adds a new command line switch to modify
permissions on the receiving side.
rsync seems to work like cp unless you specify -p.
My rsyncd-perm-patch only works in rsyncd mode on server side into
the other direction. (It handles a simular problem.)
cu, Stefan