This is the mail archive of the
mailing list for the Cygwin project.
Re: Permissions change concern
- From: Eliot Moss <moss at cs dot umass dot edu>
- To: cygwin at cygwin dot com
- Date: Mon, 18 Apr 2016 16:33:19 -0400
- Subject: Re: Permissions change concern
- Authentication-results: sourceware.org; auth=none
- References: <5712F224 dot 7070308 at cs dot umass dot edu> <20160418101803 dot GM24565 at calimero dot vinschen dot de> <5714DDA9 dot 3030002 at cs dot umass dot edu> <20160418185553 dot GB31378 at calimero dot vinschen dot de>
- Reply-to: moss at cs dot umass dot edu
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
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple