Security descriptor explained

Security descriptors are data structures of security information for securable Windows objects, that is objects that can be identified by a unique name. Security descriptors can be associated with any named objects, including files, folders, shares, registry keys, processes, threads, named pipes, services, job objects and other resources.[1]

Security descriptors contain discretionary access control lists (DACLs) that contain access control entries (ACEs) that grant and deny access to trustees such as users or groups. They also contain a system access control list (SACLs) that control auditing of object access.[2] [3] ACEs may be explicitly applied to an object or inherited from a parent object. The order of ACEs in an ACL is important, with access denied ACEs appearing higher in the order than ACEs that grant access. Security descriptors also contain the object owner.

Mandatory Integrity Control is implemented through a new type of ACE on a security descriptor.[4]

Files and folder permissions can be edited by various tools including Windows Explorer, WMI, command line tools like Cacls, XCacls, ICacls, SubInACL,[5] the freeware Win32 console FILEACL,[6] [7] the free software utility SetACL, and other utilities. To edit a security descriptor, a user needs WRITE_DAC permissions to the object,[8] a permission that is usually delegated by default to administrators and the object's owner.

Permissions in NTFS

The following table summarizes NTFS permissions and their roles (in individual rows.) The table exposes the following information:[9] [10] [11]

Permission
code
MeaningIncluded inAlias
For filesFor foldersREWAMIn icaclsIn cacls
0x01 Read data List folder contentsRD FILE_READ_DATA
0x80 Read attributesRA FILE_READ_ATTRIBUTES
0x08 Read extended attributesREA FILE_READ_EA
0x20 Execute file Traverse folderX FILE_EXECUTE
0x20000 Read permissionsRC READ_CONTROL
0x100000 SynchronizeS SYNCHRONIZE
0x02 Write data Create filesWD FILE_WRITE_DATA
0x04 Append data Create foldersAD FILE_APPEND_D
0x100 Write attributesWA FILE_WRITE_ATTRIBUTES
0x10 Write extended attributesWEA FILE_WRITE_EA
0x10000 Delete (or rename)DE DELETE
0x40000 Change permissionsWDAC WRITE_DAC
0x80000 Take ownershipWO WRITE_OWNER
0x40 Delete subfolders and filesDC FILE_DELETE_CHILD

Most of these permissions are self-explanatory, except the following:

  1. Renaming a file requires the "Delete" permission.
  2. File Explorer doesn't show "Synchronize" and always sets it. Multi-threaded apps like File Explorer and Windows Command Prompt need the "Synchronize" permission to be able to work with files and folders.[12]

See also

External links

Notes and References

  1. Web site: Securable Objects. Microsoft. 2008-04-24. 2008-07-16.
  2. Web site: What Are Security Descriptors and Access Control Lists?. Microsoft. 2008-07-16. dead. https://web.archive.org/web/20080505125439/http://technet2.microsoft.com/windowsserver/en/library/d4f08d96-f360-451f-bed3-61a60bc2acde1033.mspx?mfr=true. 2008-05-05.
  3. Web site: DACLs and ACEs. Microsoft. 2008-04-24. 2008-07-16.
  4. https://msdn.microsoft.com/en-us/library/bb625957.aspx What is the Windows Integrity Mechanism?
  5. http://www.microsoft.com/downloadS/details.aspx?FamilyID=e8ba3e56-d8fe-4a91-93cf-ed6985e3927b&displaylang=en SubInACL home page
  6. http://www.gbordier.com/gbtools/fileacl.asp FILEACL home page
  7. Web site: FILEACL v3.0.1.6 . . 2004-03-23 . 2008-07-25 . dead . https://web.archive.org/web/20080416053942/http://www.microsoft.com/downloads/details.aspx?FamilyID=723F64EA-34F0-4E6D-9A72-004D35DE4E64&displaylang=en . April 16, 2008 .
  8. Web site: ACCESS_MASK Data Type. Microsoft. 2008-04-24. 2008-07-23.
  9. Web site: How Permissions Work. Microsoft. 2013-06-21. 2017-11-24.
  10. Web site: How IT works NTFS Permissions, Part 2. Richard Civil. Microsoft. 2017-11-24.
  11. Web site: How IT works NTFS Permissions. Richard Civil. Microsoft. 2017-11-24.
  12. Web site: Chen . Raymond . I set the same ACL with the GUI and with icacls, yet the results are different . The Old New Thing . . 18 November 2019.