setcifsacl: Shouldn't 0x0 be a valid mask?
Subsystems (2)
I was looking at using S-1-2-3-4 to take away rights via ownership and granting no access (but not denying it either) makes sense as access is granted via group membership. Microsofts documentation seems to suggest the a 0x0 mask is valid.
Quote from https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/dd125370(v=ws.10)?redirectedfrom=MSDN
"When you add the Owner Rights security principal to objects, you can specify what permissions are given to the owner of an object. For example you can specify in the access control entry (ACE) of an object that the owner of a particular object is given Read permissions or you can specify NULL permissions to an object, which grants the owner of the object no permissions."
Here is example output:
# setcifsacl -a "ACL:S-1-2-3-4:0x0/0x0/0x0" bruno-test verify_ace_mask: Invalid mask 0x0 (value 0x0)
Besides the owner rights case, I think this might also make sense in an ACL to break inheritence, though in that case there might be other ways to do that.
Unless having a 0x0 mask actually breaks things, it doesn't seem that it is a good idea to prohibit it.
Do you have an example of doing the same thing via
"smbcacls" (from Linux) or "icacls" (or cacls.exe) from Windows?
Quoted 24 lines · Bruno Wolff III
I was looking at using S-1-2-3-4 to take away rights via ownership and granting no access (but not denying it either) makes sense as access is granted via group membership. Microsofts documentation seems to suggest the a
0x0mask is valid.
Quote from
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/dd125370(v=ws.10)?redirectedfrom=MSDN
"When you add the Owner Rights security principal to objects, you can specify what permissions are given to the owner of an object. For example you can specify in the access control entry (ACE) of an object that the owner of a particular object is given Read permissions or you can specify NULL permissions to an object, which grants the owner of the object no permissions."Here is example output:
# setcifsacl -a "ACL:S-1-2-3-4:0x0/0x0/0x0" bruno-test verify_ace_mask: Invalid mask 0x0 (value 0x0)Besides the owner rights case, I think this might also make sense in an ACL to break inheritence, though in that case there might be other ways to do that.
Unless having a
0x0mask actually breaks things, it doesn't seem that it is a good idea to prohibit it.
Signature · 3 lines
Thanks, Steve
Quoted 3 lines · Steve French
Do you have an example of doing the same thing via
"smbcacls" (from Linux) or "icacls" (or cacls.exe) from Windows?
Not yet. I'll see if I can get an example quickly.
Quoted 3 lines · Steve French
Do you have an example of doing the same thing via
"smbcacls" (from Linux) or "icacls" (or cacls.exe) from Windows?
smbcacls seems to also not allow 0x0 for the permissions part of the ACL. I'll see if I can check on cacls.exe.
Quoted 3 lines · Steve French
Do you have an example of doing the same thing via
"smbcacls" (from Linux) or "icacls" (or cacls.exe) from Windows?
I'm still trying to get the correct syntax for icacls, but when I used a GUI I was able to add an ACL with no access which icacls will display:
PS C:\Users\bruno-a> icacls forwards
forwards OWNER RIGHTS:
NT AUTHORITY\SYSTEM:(I)(F)
BUILTIN\Administrators:(I)(F)
AD\bruno-a:(I)(F)Successfully processed 1 files; Failed processing 0 files
A message that is not in the archive (sent off-list or not yet received): CAH2r5msf525KHBUTgiTMFwzm=Wk_0vGeHuWFia1ijBETSvG4Ew@mail.gmail.com
I changed a file in a place I could mount remotely and getcifsacl is showing a permision mask of 0. So it does look like it is possible to get them in NTFS.
# getcifsacl test-bruno # filename: test-bruno REVISION:0x1 CONTROL:0x8404 OWNER:S-1-5-21-1229272821-630328440-682003330-2408 GROUP:S-1-5-21-1229272821-630328440-682003330-513 DACL: ACL:S-1-3-4:ALLOWED/0x0/ ACL:S-1-5-18:ALLOWED/I/FULL ACL:S-1-5-32-544:ALLOWED/I/FULL No SACL