chmod g+s ineffective

Eliot Moss moss@cs.umass.edu
Mon Jul 11 02:33:47 GMT 2022


On 7/10/2022 10:17 PM, Chris Wagner wrote:
>>> On 6/29/2022 9:18 AM, Norton Allen wrote:
>>>>>> On one machine I have, chmod g+s fails to set the sticky bit. The >>> command
>>>>>> does not return any error, but ls -l continues to show the bit not set.
>>>>>>      $ mkdir foo
>>>>>>      $ chgrp flight foo
>>>>>>      $ chmod g+ws foo
>>>>>>      $ ls -ld foo
>>>>>>      drwxrwxr-x+ 1 nort flight 0 Jun 29 06:50 foo
> 
> Hi.  The permission bits are implemented as normal Window's DACLs (Discretionary Access List).  +s 
> is implemented magically with the NULL SID.  You can view it from Explorer or with icacls.  Try 
> checking the return code (echo $?) from chmod.  Also try changing perms from Explorer.  You might 
> not be able to set the NULL SID for some reason.

I'd like to add that, for good reason, the Cygwin DACLs do not conform
to the order of entries that some Windows tools prefer.  Don't let any
Windows program/tool reorder the DACLs!  It will break the Cygwin
functionality, and the Cygwin order does not break Windows functionality.

Best - Eliot Moss


More information about the Cygwin mailing list