Workflow Tools Control Yard

Home / Windows

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

DecimalHexGet-Acl showsWhat it is
20321270x1F01FFFullControlFull control: FILE_ALL_ACCESS.
12456310x1301BFModify, SynchronizeModify: read, write, run and delete, with SYNCHRONIZE.
11798170x1200A9ReadAndExecute, SynchronizeRead and execute: FILE_GENERIC_READ and FILE_GENERIC_EXECUTE.
11797850x120089Read, SynchronizeRead: FILE_GENERIC_READ.
11799260x120116Write, ReadPermissions, SynchronizeWrite: FILE_GENERIC_WRITE.
11800630x12019FWrite, Read, SynchronizeRead and write: FILE_GENERIC_READ and FILE_GENERIC_WRITE.
11800950x1201BFWrite, ReadAndExecute, SynchronizeRead, write and execute, without delete.
10485760x100000SynchronizeSYNCHRONIZE alone.
2684354560x10000000268435456Generic all. FileSystemRights has no names for the generic rights, so Get-Acl shows the number.
-16106127360xA0000000-1610612736Generic read and generic execute, which stand for FILE_GENERIC_READ and FILE_GENERIC_EXECUTE on a file.
-5368053760xE0010000-536805376Generic read, write and execute, and DELETE: the same rights as Modify, in generic form.
-10737418240xC0000000-1073741824Generic read and generic write.
10x1ReadData/ListDirectoryRead data, or list a folder.
20x2WriteData/CreateFilesWrite data, or create a file in a folder.
655360x10000DeleteDELETE alone.

All rights

RightHexDecimalicaclsMeaning
0x000000011RDRead the data of a file; on a folder, list what is in it.
0x000000022WDWrite to a file; on a folder, create files in it.
0x000000044ADAdd data at the end of a file; on a folder, create folders in it.
0x000000088REARead extended attributes.
0x0000001016WEAWrite extended attributes.
0x0000002032XRun a program file; on a folder, go through it to what is inside.
0x0000004064DCOn a folder: delete the files and folders in it, read-only ones too.
0x00000080128RARead attributes such as read-only and hidden.
0x00000100256WAChange attributes such as read-only and hidden.
0x0001000065536DEDelete the object itself.
0x00020000131072RCRead the owner and the permissions. Reading the audit settings needs ACCESS_SYSTEM_SECURITY.
0x00040000262144WDACChange the permissions.
0x00080000524288WOTake ownership: make yourself the owner.
0x001000001048576SWait on the object's handle. For files, the read, write and execute rights all include it.
0x0100000016777216ASRead or change the audit settings (the SACL). It needs the Manage auditing and security log privilege.
0x0200000033554432MAAsked for when an object is opened: every right the caller has.
0x10000000268435456GAGeneric all: every right the object type has.
0x20000000536870912GEGeneric execute: the object type's execute rights.
0x400000001073741824GWGeneric write: the object type's write rights.
0x800000002147483648GRGeneric 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.

DecimalHexNameMeaning
10x1ReadDataRead the data of a file.
10x1ListDirectoryList a folder.
20x2WriteDataWrite to a file.
20x2CreateFilesCreate files in a folder.
40x4AppendDataAdd data at the end of a file.
40x4CreateDirectoriesCreate folders in a folder.
80x8ReadExtendedAttributesRead extended attributes.
160x10WriteExtendedAttributesWrite extended attributes.
320x20ExecuteFileRun a program file.
320x20TraverseGo through a folder.
640x40DeleteSubdirectoriesAndFilesDelete what is in a folder.
1280x80ReadAttributesRead attributes.
2560x100WriteAttributesChange attributes.
2780x116WriteWriteData, AppendData, WriteExtendedAttributes and WriteAttributes.
655360x10000DeleteDelete the file or folder.
1310720x20000ReadPermissionsRead the permissions.
1312090x20089ReadReadData, ReadExtendedAttributes, ReadAttributes and ReadPermissions.
1312410x200A9ReadAndExecuteRead, and ExecuteFile.
1970550x301BFModifyReadAndExecute, Write and Delete.
2621440x40000ChangePermissionsChange the permissions.
5242880x80000TakeOwnershipTake ownership.
10485760x100000SynchronizeWait on the handle.
20321270x1F01FFFullControlEvery right on the file or folder.

Registry key

The rights of registry key permissions.

Common values

DecimalHexGet-Acl showsWhat it is
9831030xF003FFullControlFull control: KEY_ALL_ACCESS.
1310970x20019ExecuteKey/ReadKeyRead: KEY_READ, which KEY_EXECUTE equals.
1310780x20006WriteKeyWrite: KEY_WRITE.
1311030x2001FSetValue, CreateSubKey, ExecuteKey/ReadKeyRead and write: KEY_READ and KEY_WRITE.
2684354560x10000000268435456Generic all. RegistryRights has no names for the generic rights, so Get-Acl shows the number.
-21474836480x80000000-2147483648Generic read.
10x1QueryValuesRead the values of the key.

All rights

RightHexDecimalMeaning
0x000000011Read the values of the key.
0x000000022Create, change and delete values of the key.
0x000000044Create subkeys.
0x000000088List the subkeys.
0x0000001016Ask to be told when the key changes.
0x0000002032Reserved for the system.
0x00000100256On 64-bit Windows, open the 64-bit view of the registry. It selects a view; it is not a right in a permission.
0x00000200512On 64-bit Windows, open the 32-bit view of the registry. It selects a view; it is not a right in a permission.
0x0001000065536Delete the object itself.
0x00020000131072Read the owner and the permissions. Reading the audit settings needs ACCESS_SYSTEM_SECURITY.
0x00040000262144Change the permissions.
0x00080000524288Take ownership: make yourself the owner.
0x001000001048576Wait on the object's handle. For files, the read, write and execute rights all include it.
0x0100000016777216Read or change the audit settings (the SACL). It needs the Manage auditing and security log privilege.
0x0200000033554432Asked for when an object is opened: every right the caller has.
0x10000000268435456Generic all: every right the object type has.
0x20000000536870912Generic execute: the object type's execute rights.
0x400000001073741824Generic write: the object type's write rights.
0x800000002147483648Generic 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.

DecimalHexNameMeaning
10x1QueryValuesRead the values.
20x2SetValueCreate, change and delete values.
40x4CreateSubKeyCreate subkeys.
80x8EnumerateSubKeysList the subkeys.
160x10NotifyAsk to be told of changes.
655360x10000DeleteDelete the key.
1310720x20000ReadPermissionsRead the permissions.
1310780x20006WriteKeySetValue, CreateSubKey and ReadPermissions.
1310970x20019ExecuteKeyThe same as ReadKey.
1310970x20019ReadKeyQueryValues, EnumerateSubKeys, Notify and ReadPermissions.
2621440x40000ChangePermissionsChange the permissions.
5242880x80000TakeOwnershipTake ownership.
9831030xF003FFullControlEvery 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

DecimalHexGet-Acl showsWhat it is
9835510xF01FFGenericAllFull control: every right on the object.
1312200x20094GenericReadRead: ReadControl, list, list object and read all properties.
1311120x20028GenericWriteWrite: ReadControl, write all properties and all validated writes.
1310920x20014ReadProperty, GenericExecuteRead permissions, list the child objects and read the properties.
2560x100ExtendedRightControl access, alone: an extended right. The GUID next to it in the entry or in event 4662 says which.
160x10ReadPropertyRead property: the GUID next to it says which attribute or property set.
320x20WritePropertyWrite property: the GUID next to it says which attribute or property set.
480x30ReadProperty, WritePropertyRead and write property.
80x8SelfValidated write: the GUID next to it says which.
30x3CreateChild, DeleteChildCreate and delete child objects.
655360x10000DeleteDELETE alone.
2621440x40000WriteDaclWRITE_DAC alone: change the permissions.

All rights

RightHexDecimalMeaning
0x000000011Create child objects: of the class the entry's GUID names, or of any class.
0x000000022Delete child objects: of the class the entry's GUID names, or of any class.
0x000000044List the child objects.
0x000000088Validated write: the one the entry's GUID names, or all of them.
0x0000001016Read properties: the attribute or property set the entry's GUID names, or all of them.
0x0000002032Write properties: the attribute or property set the entry's GUID names, or all of them.
0x0000004064Delete the object with all its child objects, whatever their permissions.
0x00000080128See this object when listing its parent, where the list object mode is on.
0x00000100256Control access: the extended right the entry's GUID names, or all of them. In event 4662 it shows as Access Mask 0x100.
0x0001000065536Delete the object itself.
0x00020000131072Read the owner and the permissions. Reading the audit settings needs ACCESS_SYSTEM_SECURITY.
0x00040000262144Change the permissions.
0x00080000524288Take ownership: make yourself the owner.
0x001000001048576Wait on the object's handle. For files, the read, write and execute rights all include it.
0x0100000016777216Read or change the audit settings (the SACL). It needs the Manage auditing and security log privilege.
0x0200000033554432Asked for when an object is opened: every right the caller has.
0x10000000268435456Generic all: every right the object type has.
0x20000000536870912Generic execute: the object type's execute rights.
0x400000001073741824Generic write: the object type's write rights.
0x800000002147483648Generic 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.

DecimalHexNameMeaning
10x1CreateChildCreate child objects.
20x2DeleteChildDelete child objects.
40x4ListChildrenList child objects.
80x8SelfValidated write.
160x10ReadPropertyRead properties.
320x20WritePropertyWrite properties.
640x40DeleteTreeDelete the object and all below it.
1280x80ListObjectSee the object in a list.
2560x100ExtendedRightExtended right (control access).
655360x10000DeleteDelete the object.
1310720x20000ReadControlRead the permissions.
1310760x20004GenericExecuteReadControl and ListChildren.
1311120x20028GenericWriteReadControl, WriteProperty and Self.
1312200x20094GenericReadReadControl, ReadProperty, ListObject and ListChildren.
2621440x40000WriteDaclChange the permissions.
5242880x80000WriteOwnerTake ownership.
9835510xF01FFGenericAllEvery right on the object.
10485760x100000SynchronizeWait on the object.
167772160x1000000AccessSystemSecurityRead 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.

BitsWhat they hold
0 to 15Rights 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 20Standard rights, the same for every object type: DELETE, READ_CONTROL, WRITE_DAC, WRITE_OWNER and SYNCHRONIZE.
24ACCESS_SYSTEM_SECURITY: the audit settings.
25MAXIMUM_ALLOWED.
28 to 31Generic 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:

LettersMeaning
(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

More Windows tools