Permissions of the top-level destination directory without
--perms
Paul Slootman
paul at debian.org
Sat Feb 17 14:42:01 GMT 2007
On Fri 16 Feb 2007, Matt McCutchen wrote:
> I noticed that rsync sometimes miscalculates the permissions of the
> top-level destination directory when --perms is off. For example, run
> these commands in an area free of default ACLs:
>
> umask 0000
> mkdir -p src/foo
> chmod 700 src src/foo
> rsync -r src/ dest/
> find . -ls
>
> 763054 0 drwx------ 4 matt matt 96 Feb 16 17:57 .
> 763158 0 drwx------ 3 matt matt 72 Feb 16 17:57 ./src
> 1424849 0 drwx------ 2 matt matt 48 Feb 16 17:57
> ./src/foo
> 1075094 0 drwxrwxrwx 3 matt matt 72 Feb 16 17:57 ./dest
> 1511362 0 drwx------ 2 matt matt 48 Feb 16 17:57
> ./dest/foo
>
> Notice that the permissions of dest/foo were correctly restricted by
> the 700 permissions of src/foo, but the permissions of dest were not
> restricted by the permissions of src.
Actually, I find the above behaviour to be what I'd expect;
after all, you're telling it to transfer the contents of src, not src
itself; and dest is an implied directory, and created with default
permissions.
Paul Slootman
More information about the rsync
mailing list