[PATCH] rsync without --perms may set bogus permissions

Christian Franke Christian.Franke@t-online.de
Wed Dec 15 22:47:00 GMT 2010


Christian Franke wrote:
> Rsync may set bogus permissions if --perms is not specified and ACLs 
> are enabled. This happens if the destination directory was not created 
> by Cygwin itself. Testcase:
> [...]
>
>
> For some (security?) reason rsync (without --perms) does not rely on 
> permissions set by open(., O_CREAT, .). The permissions are set later 
> based on the default ACL of the parent dir.
>
> The problem is that the rsync function acls.c:rsync_acl_get_perms() 
> expects that the default ACL has an "other" entry and that the "mask" 
> entry has only 3 rwx-bits.
>
> The default ACL returned by Cygwin does not contain an "other" entry 
> in this case. The default "mask" is 0777 (OK or Cygwin bug?):
>

The ACL issues are now fixed in Cygwin CVS. The rsync problem should no 
longer occur with future cygwin1.dll releases.

Christian


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list