Workflow Tools Control Yard

Home / Windows

icacls explainer and command builder

Paste what icacls prints for a file or folder, such as BUILTIN\Users:(OI)(CI)(RX), to read every entry in words: who, allowed or denied, which rights, inherited or not, and where it applies. Below it, build icacls commands that grant, deny or remove rights and turn inheritance on or off.

Build a command

Command

icacls <path>
What and who
Action
Rights

Specific rights

Applies to

Options

How icacls shows an entry

icacls prints the path, then one entry per line: the account, a colon, and groups in parentheses. Inheritance flags come first, then the rights: a basic permission such as (M), or specific rights separated by commas. A deny entry starts with (DENY); an entry inherited from the parent folder carries (I). icacls keeps entries in this order: explicit denials, explicit grants, inherited denials, inherited grants.

The flags say where an entry applies, in the words of Microsoft's cacls reference:

FlagsApplies to
No output messageThis folder only.
(OI)(CI)This folder, subfolders, and files.
(OI)(CI)(IO)Subfolders and files only.
(CI)(IO)Subfolders only.
(OI)(IO)Files only.
FlagMeaning
(I)Inherited from the parent container.
(OI)Object inherit: files in this folder inherit the entry. Folders only.
(CI)Container inherit: subfolders inherit the entry. Folders only.
(IO)Inherit only: the entry passes to what is inside but does not apply to this folder itself. Folders only.
(NP)Do not propagate: the entry is inherited one level down but goes no further. Folders only.

Rights

Basic permissions stand alone, without parentheses in a command:

RightMeaning
NNo access
FFull access
MModify access
RXRead and execute access
RRead-only access
WWrite-only access
DDelete access

Specific rights go in parentheses, separated by commas. The access mask decoder shows the bits behind them in a mask such as 0x1200A9.

RightMeaning
DEDelete
RCRead control (read permissions)
WDACWrite DAC (change permissions)
WOWrite owner (take ownership)
SSynchronize
ASAccess system security
MAMaximum allowed
GRGeneric read
GWGeneric write
GEGeneric execute
GAGeneric all
RDRead data/list directory
WDWrite data/add file
ADAppend data/add subdirectory
REARead extended attributes
WEAWrite extended attributes
XExecute/traverse
DCDelete child
RARead attributes
WAWrite attributes

Before you run a command

Sources

More Windows tools