On Nov 5 14:47, Illia Bobyr wrote: > On 11/5/2010 11:56 AM, Eric Blake wrote: > > [...] > > On Linux: > > > > $ setfacl -m mask:rwx d/f > > $ getfacl d/f > > # file: d/f > > # owner: eblake > > # group: eblake > > user::rw- > > user:dummy:rwx > > group::rw- > > mask::rwx > > other::r-- > > > > $ chmod -x d/f > > $ getfacl d/f > > # file: d/f > > # owner: eblake > > # group: eblake > > user::rw- > > user:dummy:rwx #effective:rw- > > group::rwx #effective:rw- > > mask::rw- > > other::r-- > > > > Interestingly - that means that on Linux, chmod -x changed the mask > > entry of the ACLs, such that the effective permissions for the alternate > > user are no longer permitted; so even though user dummy has rwx ACLs, > > the mask prevents the user from executing the file any more. > > > > Cygwin does not emulate Linux in this regards at the moment, but now > > that you have pointed out a simple test case, it may be possible to > > patch cygwin1.dll to make the chmod() syscall affect the ACL mask as on > > Linux.
That's very tricky. The chmod function only gets a new mode_t value which only applies to owner/group/others and the mask value. The mask value is changed by a chmod as well and non-default users and groups in the ACL are only affected indirectly by the mask value which results in effective permissions, as you can see above. And here's the problem: > It seems that setfacl also does not change the "mask" part on Cygwin: There's no equivalent for the Solaris/POSIX mask value in the Windows ACL. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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