Access mask decoder
An access mask is the number in a permission that says which rights it holds. It turns up in Get-Acl output, in the security events 4656, 4663 and 4662, and in tools that read security descriptors. Enter one to see its rights for a file or folder, a registry key or an Active Directory object.
File or folder
The rights of NTFS permissions. The icacls column gives the letters icacls uses for each right.
Common values
| Decimal | Hex | Get-Acl shows | What it is |
|---|---|---|---|
| 2032127 | 0x1F01FF | FullControl | Full control: FILE_ALL_ACCESS. |
| 1245631 | 0x1301BF | Modify, Synchronize | Modify: read, write, run and delete, with SYNCHRONIZE. |
| 1179817 | 0x1200A9 | ReadAndExecute, Synchronize | Read and execute: FILE_GENERIC_READ and FILE_GENERIC_EXECUTE. |
| 1179785 | 0x120089 | Read, Synchronize | Read: FILE_GENERIC_READ. |
| 1179926 | 0x120116 | Write, ReadPermissions, Synchronize | Write: FILE_GENERIC_WRITE. |
| 1180063 | 0x12019F | Write, Read, Synchronize | Read and write: FILE_GENERIC_READ and FILE_GENERIC_WRITE. |
| 1180095 | 0x1201BF | Write, ReadAndExecute, Synchronize | Read, write and execute, without delete. |
| 1048576 | 0x100000 | Synchronize | SYNCHRONIZE alone. |
| 268435456 | 0x10000000 | 268435456 | Generic all. FileSystemRights has no names for the generic rights, so Get-Acl shows the number. |
| -1610612736 | 0xA0000000 | -1610612736 | Generic read and generic execute, which stand for FILE_GENERIC_READ and FILE_GENERIC_EXECUTE on a file. |
| -536805376 | 0xE0010000 | -536805376 | Generic read, write and execute, and DELETE: the same rights as Modify, in generic form. |
| -1073741824 | 0xC0000000 | -1073741824 | Generic read and generic write. |
| 1 | 0x1 | ReadData/ListDirectory | Read data, or list a folder. |
| 2 | 0x2 | WriteData/CreateFiles | Write data, or create a file in a folder. |
| 65536 | 0x10000 | Delete | DELETE alone. |
All rights
| Right | Hex | Decimal | icacls | Meaning | |
|---|---|---|---|---|---|
0x00000001 | 1 | RD | Read the data of a file; on a folder, list what is in it. | ||
0x00000002 | 2 | WD | Write to a file; on a folder, create files in it. | ||
0x00000004 | 4 | AD | Add data at the end of a file; on a folder, create folders in it. | ||
0x00000008 | 8 | REA | Read extended attributes. | ||
0x00000010 | 16 | WEA | Write extended attributes. | ||
0x00000020 | 32 | X | Run a program file; on a folder, go through it to what is inside. | ||
0x00000040 | 64 | DC | On a folder: delete the files and folders in it, read-only ones too. | ||
0x00000080 | 128 | RA | Read attributes such as read-only and hidden. | ||
0x00000100 | 256 | WA | Change attributes such as read-only and hidden. | ||
0x00010000 | 65536 | DE | Delete the object itself. | ||
0x00020000 | 131072 | RC | Read the owner and the permissions. Reading the audit settings needs ACCESS_SYSTEM_SECURITY. | ||
0x00040000 | 262144 | WDAC | Change the permissions. | ||
0x00080000 | 524288 | WO | Take ownership: make yourself the owner. | ||
0x00100000 | 1048576 | S | Wait on the object's handle. For files, the read, write and execute rights all include it. | ||
0x01000000 | 16777216 | AS | Read or change the audit settings (the SACL). It needs the Manage auditing and security log privilege. | ||
0x02000000 | 33554432 | MA | Asked for when an object is opened: every right the caller has. | ||
0x10000000 | 268435456 | GA | Generic all: every right the object type has. | ||
0x20000000 | 536870912 | GE | Generic execute: the object type's execute rights. | ||
0x40000000 | 1073741824 | GW | Generic write: the object type's write rights. | ||
0x80000000 | 2147483648 | GR | Generic read: the object type's read rights. |
FileSystemRights values
The names .NET and PowerShell use. Get-Acl writes a mask with these names, taking the largest that fits first, and writes the number instead when bits are left that no name covers. Where two names share a value, the page gives both.
| Decimal | Hex | Name | Meaning |
|---|---|---|---|
| 1 | 0x1 | ReadData | Read the data of a file. |
| 1 | 0x1 | ListDirectory | List a folder. |
| 2 | 0x2 | WriteData | Write to a file. |
| 2 | 0x2 | CreateFiles | Create files in a folder. |
| 4 | 0x4 | AppendData | Add data at the end of a file. |
| 4 | 0x4 | CreateDirectories | Create folders in a folder. |
| 8 | 0x8 | ReadExtendedAttributes | Read extended attributes. |
| 16 | 0x10 | WriteExtendedAttributes | Write extended attributes. |
| 32 | 0x20 | ExecuteFile | Run a program file. |
| 32 | 0x20 | Traverse | Go through a folder. |
| 64 | 0x40 | DeleteSubdirectoriesAndFiles | Delete what is in a folder. |
| 128 | 0x80 | ReadAttributes | Read attributes. |
| 256 | 0x100 | WriteAttributes | Change attributes. |
| 278 | 0x116 | Write | WriteData, AppendData, WriteExtendedAttributes and WriteAttributes. |
| 65536 | 0x10000 | Delete | Delete the file or folder. |
| 131072 | 0x20000 | ReadPermissions | Read the permissions. |
| 131209 | 0x20089 | Read | ReadData, ReadExtendedAttributes, ReadAttributes and ReadPermissions. |
| 131241 | 0x200A9 | ReadAndExecute | Read, and ExecuteFile. |
| 197055 | 0x301BF | Modify | ReadAndExecute, Write and Delete. |
| 262144 | 0x40000 | ChangePermissions | Change the permissions. |
| 524288 | 0x80000 | TakeOwnership | Take ownership. |
| 1048576 | 0x100000 | Synchronize | Wait on the handle. |
| 2032127 | 0x1F01FF | FullControl | Every right on the file or folder. |
Registry key
The rights of registry key permissions.
Common values
| Decimal | Hex | Get-Acl shows | What it is |
|---|---|---|---|
| 983103 | 0xF003F | FullControl | Full control: KEY_ALL_ACCESS. |
| 131097 | 0x20019 | ExecuteKey/ReadKey | Read: KEY_READ, which KEY_EXECUTE equals. |
| 131078 | 0x20006 | WriteKey | Write: KEY_WRITE. |
| 131103 | 0x2001F | SetValue, CreateSubKey, ExecuteKey/ReadKey | Read and write: KEY_READ and KEY_WRITE. |
| 268435456 | 0x10000000 | 268435456 | Generic all. RegistryRights has no names for the generic rights, so Get-Acl shows the number. |
| -2147483648 | 0x80000000 | -2147483648 | Generic read. |
| 1 | 0x1 | QueryValues | Read the values of the key. |
All rights
| Right | Hex | Decimal | Meaning | |
|---|---|---|---|---|
0x00000001 | 1 | Read the values of the key. | ||
0x00000002 | 2 | Create, change and delete values of the key. | ||
0x00000004 | 4 | Create subkeys. | ||
0x00000008 | 8 | List the subkeys. | ||
0x00000010 | 16 | Ask to be told when the key changes. | ||
0x00000020 | 32 | Reserved for the system. | ||
0x00000100 | 256 | On 64-bit Windows, open the 64-bit view of the registry. It selects a view; it is not a right in a permission. | ||
0x00000200 | 512 | On 64-bit Windows, open the 32-bit view of the registry. It selects a view; it is not a right in a permission. | ||
0x00010000 | 65536 | Delete the object itself. | ||
0x00020000 | 131072 | Read the owner and the permissions. Reading the audit settings needs ACCESS_SYSTEM_SECURITY. | ||
0x00040000 | 262144 | Change the permissions. | ||
0x00080000 | 524288 | Take ownership: make yourself the owner. | ||
0x00100000 | 1048576 | Wait on the object's handle. For files, the read, write and execute rights all include it. | ||
0x01000000 | 16777216 | Read or change the audit settings (the SACL). It needs the Manage auditing and security log privilege. | ||
0x02000000 | 33554432 | Asked for when an object is opened: every right the caller has. | ||
0x10000000 | 268435456 | Generic all: every right the object type has. | ||
0x20000000 | 536870912 | Generic execute: the object type's execute rights. | ||
0x40000000 | 1073741824 | Generic write: the object type's write rights. | ||
0x80000000 | 2147483648 | Generic read: the object type's read rights. |
RegistryRights values
The names .NET and PowerShell use. Get-Acl writes a mask with these names, taking the largest that fits first, and writes the number instead when bits are left that no name covers. Where two names share a value, the page gives both.
| Decimal | Hex | Name | Meaning |
|---|---|---|---|
| 1 | 0x1 | QueryValues | Read the values. |
| 2 | 0x2 | SetValue | Create, change and delete values. |
| 4 | 0x4 | CreateSubKey | Create subkeys. |
| 8 | 0x8 | EnumerateSubKeys | List the subkeys. |
| 16 | 0x10 | Notify | Ask to be told of changes. |
| 32 | 0x20 | CreateLink | Reserved for the system. |
| 65536 | 0x10000 | Delete | Delete the key. |
| 131072 | 0x20000 | ReadPermissions | Read the permissions. |
| 131078 | 0x20006 | WriteKey | SetValue, CreateSubKey and ReadPermissions. |
| 131097 | 0x20019 | ExecuteKey | The same as ReadKey. |
| 131097 | 0x20019 | ReadKey | QueryValues, EnumerateSubKeys, Notify and ReadPermissions. |
| 262144 | 0x40000 | ChangePermissions | Change the permissions. |
| 524288 | 0x80000 | TakeOwnership | Take ownership. |
| 983103 | 0xF003F | FullControl | Every right on the key. |
Active Directory object
The rights of permissions on Active Directory objects, as the Access Mask of event 4662 and Get-Acl on the AD: drive show them. Read, write, create, delete, validated write and control access can be narrowed by a GUID in the same entry.
Common values
| Decimal | Hex | Get-Acl shows | What it is |
|---|---|---|---|
| 983551 | 0xF01FF | GenericAll | Full control: every right on the object. |
| 131220 | 0x20094 | GenericRead | Read: ReadControl, list, list object and read all properties. |
| 131112 | 0x20028 | GenericWrite | Write: ReadControl, write all properties and all validated writes. |
| 131092 | 0x20014 | ReadProperty, GenericExecute | Read permissions, list the child objects and read the properties. |
| 256 | 0x100 | ExtendedRight | Control access, alone: an extended right. The GUID next to it in the entry or in event 4662 says which. |
| 16 | 0x10 | ReadProperty | Read property: the GUID next to it says which attribute or property set. |
| 32 | 0x20 | WriteProperty | Write property: the GUID next to it says which attribute or property set. |
| 48 | 0x30 | ReadProperty, WriteProperty | Read and write property. |
| 8 | 0x8 | Self | Validated write: the GUID next to it says which. |
| 3 | 0x3 | CreateChild, DeleteChild | Create and delete child objects. |
| 65536 | 0x10000 | Delete | DELETE alone. |
| 262144 | 0x40000 | WriteDacl | WRITE_DAC alone: change the permissions. |
All rights
| Right | Hex | Decimal | Meaning | |
|---|---|---|---|---|
0x00000001 | 1 | Create child objects: of the class the entry's GUID names, or of any class. | ||
0x00000002 | 2 | Delete child objects: of the class the entry's GUID names, or of any class. | ||
0x00000004 | 4 | List the child objects. | ||
0x00000008 | 8 | Validated write: the one the entry's GUID names, or all of them. | ||
0x00000010 | 16 | Read properties: the attribute or property set the entry's GUID names, or all of them. | ||
0x00000020 | 32 | Write properties: the attribute or property set the entry's GUID names, or all of them. | ||
0x00000040 | 64 | Delete the object with all its child objects, whatever their permissions. | ||
0x00000080 | 128 | See this object when listing its parent, where the list object mode is on. | ||
0x00000100 | 256 | Control access: the extended right the entry's GUID names, or all of them. In event 4662 it shows as Access Mask 0x100. | ||
0x00010000 | 65536 | Delete the object itself. | ||
0x00020000 | 131072 | Read the owner and the permissions. Reading the audit settings needs ACCESS_SYSTEM_SECURITY. | ||
0x00040000 | 262144 | Change the permissions. | ||
0x00080000 | 524288 | Take ownership: make yourself the owner. | ||
0x00100000 | 1048576 | Wait on the object's handle. For files, the read, write and execute rights all include it. | ||
0x01000000 | 16777216 | Read or change the audit settings (the SACL). It needs the Manage auditing and security log privilege. | ||
0x02000000 | 33554432 | Asked for when an object is opened: every right the caller has. | ||
0x10000000 | 268435456 | Generic all: every right the object type has. | ||
0x20000000 | 536870912 | Generic execute: the object type's execute rights. | ||
0x40000000 | 1073741824 | Generic write: the object type's write rights. | ||
0x80000000 | 2147483648 | Generic read: the object type's read rights. |
ActiveDirectoryRights values
The names .NET and PowerShell use. Get-Acl writes a mask with these names, taking the largest that fits first, and writes the number instead when bits are left that no name covers. Where two names share a value, the page gives both.
| Decimal | Hex | Name | Meaning |
|---|---|---|---|
| 1 | 0x1 | CreateChild | Create child objects. |
| 2 | 0x2 | DeleteChild | Delete child objects. |
| 4 | 0x4 | ListChildren | List child objects. |
| 8 | 0x8 | Self | Validated write. |
| 16 | 0x10 | ReadProperty | Read properties. |
| 32 | 0x20 | WriteProperty | Write properties. |
| 64 | 0x40 | DeleteTree | Delete the object and all below it. |
| 128 | 0x80 | ListObject | See the object in a list. |
| 256 | 0x100 | ExtendedRight | Extended right (control access). |
| 65536 | 0x10000 | Delete | Delete the object. |
| 131072 | 0x20000 | ReadControl | Read the permissions. |
| 131076 | 0x20004 | GenericExecute | ReadControl and ListChildren. |
| 131112 | 0x20028 | GenericWrite | ReadControl, WriteProperty and Self. |
| 131220 | 0x20094 | GenericRead | ReadControl, ReadProperty, ListObject and ListChildren. |
| 262144 | 0x40000 | WriteDacl | Change the permissions. |
| 524288 | 0x80000 | WriteOwner | Take ownership. |
| 983551 | 0xF01FF | GenericAll | Every right on the object. |
| 1048576 | 0x100000 | Synchronize | Wait on the object. |
| 16777216 | 0x1000000 | AccessSystemSecurity | Read or change the audit settings. |
How an access mask is built
Every access mask has the same 32 bits. What the low 16 bits mean depends on the kind of object.
| Bits | What they hold |
|---|---|
| 0 to 15 | Rights of the object type: for a file FILE_READ_DATA and the others, for a registry key KEY_QUERY_VALUE and the others. |
| 16 to 20 | Standard rights, the same for every object type: DELETE, READ_CONTROL, WRITE_DAC, WRITE_OWNER and SYNCHRONIZE. |
| 24 | ACCESS_SYSTEM_SECURITY: the audit settings. |
| 25 | MAXIMUM_ALLOWED. |
| 28 to 31 | Generic rights: GENERIC_ALL, GENERIC_EXECUTE, GENERIC_WRITE and GENERIC_READ. Each object type turns them into its own rights; for files, GENERIC_READ stands for FILE_GENERIC_READ. |
Because GENERIC_READ is the highest bit, a mask that holds it is negative when it is read as a signed number. Get-Acl reads masks that way, so a permission of generic read and execute shows as -1610612736.
icacls letters
icacls writes a permission as letters in brackets. Besides the letters for single rights in the table above, it has letters for its basic rights: N no access, F full access, M modify, RX read and execute, R read-only, W write-only and D delete. After the rights it shows how the permission is inherited:
| Letters | Meaning |
|---|---|
(I) | Inherited from the parent folder. |
(OI) | Object inherit: files in the folder get it. |
(CI) | Container inherit: folders in the folder get it. |
(IO) | Inherit only: it does not apply to the folder itself, only to what inherits it. |
(NP) | No propagate: it is inherited one level down and no further. |
Sources
- Microsoft's documentation, published under the Creative Commons Attribution 4.0 International licence: File Access Rights Constants, File Security and Access Rights, ACCESS_MASK, Standard Access Rights, Generic Access Rights, Registry Key Security and Access Rights, ADS_RIGHTS_ENUM, the .NET enumerations FileSystemRights, RegistryRights and ActiveDirectoryRights, and icacls. The facts are Microsoft's; the wording is this site's own.
- The numbers of the constants: winnt.h, from Microsoft's windows-rs under the MIT licence.
More Windows tools
-
Windows error code lookup
Look up 0x80070005, 0xC000006D, 1603 or any other system error, HRESULT, NTSTATUS or bug check code.
-
Robocopy command builder
Build a robocopy command line, paste one to see what each switch does, and decode its exit codes.
-
Msiexec silent install builder
Build install, uninstall and repair commands and look up MSI exit codes.
-
PowerShell EncodedCommand decoder
Read the script inside an encoded PowerShell command, layer by layer, or encode one.
-
.reg file value decoder
hex(2), hex(7), hex(b) and dword values of a .reg file as text and numbers, and a value written as .reg lines.
-
Certificate decoder
Read a certificate, a chain or a request: names, dates, thumbprint, template and account SID.
-
icacls explainer and command builder
Read icacls output such as (OI)(CI)(RX) in plain words, or build commands to grant, deny and remove rights.
-
KMS client keys and slmgr commands
Get the KMS client setup key (GVLK) of a Windows or Windows Server edition and the slmgr commands to activate it.
-
File hash checker
Work out the SHA-256, SHA-1, SHA-512 or MD5 hash of a file in your browser and compare it with the publisher's.
-
File type from its first bytes
What a file is by its first bytes, not its name: PDF, ZIP, Office, EXE or DLL with its CPU and bitness.
-
Zone.Identifier reader
The Mark of the Web on a downloaded file: its zone and address, and the commands that show and remove it.
-
Windows and IANA time zone names
Eastern Standard Time to America/New_York or America/Toronto and back, with tzutil, PowerShell and timedatectl.