On Apr 18 16:33, Eliot Moss wrote: > On 4/18/2016 2:55 PM, Corinna Vinschen wrote: > >On Apr 18 09:14, Eliot Moss wrote: > >>On 4/18/2016 6:18 AM, Corinna Vinschen wrote: > >>>On Apr 16 22:17, Eliot Moss wrote: > > >Your example looks like 775. But even then, the actual permissions > >depend on the mode bits given to the open(2) call, which are usually 666 > >in this echo example. The resulting perms should be 664. > > Thank you -- I am convinced and agree, and that is what I get. > > >Cygwin also takes the umask value into account if the newly created > >ACL only contains default POSIX permissions. That's not quite correct > >in terms of POSIX 1003.1e draft 17, but in contrast to Linux, Windows > >directory ACLs practically always have default ACEs, so we have to > >compromise a bit, or umask just has no effect at all. I fixed a > >problem with the permssion handling in case a mask value is present, but > >that shouldn't matter in your case. > > > >>2) If the directory has g+s set (visible from -s- in the flags shown > >> by getfacl), the directory's group is Cygwin, and my primary group is > >> moss, > >> then the file gets created with group moss, not group Cygwin (which is > >> what g+s is supposed to mean, right?) > > > >There was still another bug in the same code snippet which disallowed to > >set the special POSIX bits S_ISVTX/S_ISGID/S_ISUID under some > >circumstances, but apart from that what you describe works for me if the > >bit is set in the parent dir and the parent dir inherits entries. > > > >But this only works if you create the file with a Cygwin executable and > >the parent dir has inheritable ACEs. > > > >I uploaded another snapshot to https://cygwin.com/snapshots/ to make > >sure the aforementioned bug can be tested as well. Please check the > >latest snapshot again. > > > >However, if the s bit (aka S_ISGID) doesn't quite work as desired, I > >have to defer any solution (if possible) until after my vaca. > > The g+s bit now works as I hoped/expected. Thanks! E
Thanks for your feedback! Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat
signature.asc
Description: PGP signature