Pcornel
Windows

Permissions & Access Control

Cheat sheet · https://pcornel.dk/topic.php?topic=2989

Back to the Topic

Answer

Permissions & Access Control explains how Windows decides whether an access token can perform a requested operation on a securable object. The object security descriptor identifies an owner and discretionary ACL; each ACE targets a SID and grants or denies specific rights. Network file access can add a separate share-permission layer before NTFS is evaluated.

Remember

  • Windows evaluates the access token against a security descriptor; account names are resolved to SIDs.
  • NTFS and share permissions are separate authorization layers for SMB access; both must permit the requested operation.
  • Explicit and inherited ACE ordering matters, but effective access is more than a simple “deny always wins” slogan.
  • Ownership is not the same as read/write permission; taking ownership is primarily a recovery/control action.
  • A NULL DACL and an empty DACL are very different: NULL grants unrestricted access, while an empty DACL grants no access.

First checks

  • Get-Acl <path> | fl — owner and ACL
  • icacls <path> — ACEs with inheritance flags
  • whoami /groups — groups in the current token
  • Get-SmbShareAccess <share> — share permissions

Commands

icacls
Displays and modifies Windows file/folder DACLs, ownership-related ACL metadata and inheritance settings. Use it first …
takeown
Changes the owner of a Windows file or folder to the current user or Administrators (depending on options) as a recover…

Verify in this order

user token → share permissions (network) → NTFS ACL → access

Where it usually breaks

First mismatch in identity/token/certificate → policy source → security provider/enforcement → target resource → audit/detection evidence; preserve identity/native error/pre-state before mutation.

Windows authorization layers

ItemMeaningBoundary
TokenUser/group SIDs and privilegeswho is requesting access
Share permissionSMB share-level authorizationapplies when accessing through the share
NTFS DACLFilesystem object authorizationapplies to NTFS object access
OwnerControls ownership/recovery semanticsdoes not automatically grant ordinary data access
Effective resultCombined runtime access checkmust be verified in the real access path

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2989

Confirmation

Confirm action

Continue?