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.

It works for me:
$ ls -ld z
drwxrwsr-x+ 1 wagnerc Users 0 Nov 24  2020 z

$ getfacl z
# file: z
# owner: wagnerc
# group: Users
# flags: -s-
user::rwx
group::r-x
group:Administrators:rwx
group:Users:rwx
mask::rwx
other::r-x
default:user::rwx
default:user:wagnerc:rwx
default:group::r-x
default:group:Administrators:rwx
default:group:Users:rwx
default:mask::rwx
default:other::r-x


$ icacls z
z NULL SID:(DENY)(Rc,S,WD,REA,WEA,X,DC)
  APPLEJACK\wagnerc:(F)
  BUILTIN\Users:(RX)
  BUILTIN\Administrators:(RX,W,DC)
  BUILTIN\Users:(RX,W,DC)
  Everyone:(RX)
  NULL SID:(OI)(CI)(IO)(DENY)(Rc,S,WD,REA,WEA,X,DC)
  CREATOR OWNER:(OI)(CI)(IO)(F)
  APPLEJACK\wagnerc:(OI)(CI)(IO)(RX,W,DC)
  BUILTIN\Users:(OI)(CI)(IO)(RX)
  BUILTIN\Administrators:(OI)(CI)(IO)(RX,W,DC)
  BUILTIN\Users:(OI)(CI)(IO)(RX,W,DC)
  Everyone:(OI)(CI)(IO)(RX)

Successfully processed 1 files; Failed processing 0 files

$ uname -a
CYGWIN_NT-6.1 applejack 3.1.0(0.340/5/3) 2019-11-19 13:58 x86_64 Cygwin



Thanks.

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

Reply via email to