Run the following in an empty directory: mkdir test chmod 400 test rsync --dirs --perms test test2 test2 incorrectly ends up with 600 permissions because rsync sees that a local name is in use and assumes the directory retouching phase is unnecessary. rsync should run the phase anyway and deal with a local name if there is one.
Created attachment 1781 [details] Fixes the bug by running directory retouching even when there's a local name
I decided to fix this by preventing a local_name transfer from tweaking the directory's permissions in the first place (since there's no need for it to have write permission if nothing is going inside it). The fix is now in CVS. Thanks!