Skip to main content

ACL - Windows

Access Control List / File Permission

calcs

Reference

OptionPermission
nNone
rRead
wWrite
cChange (Write)
fFull Control

Replace permission

cacls <file> /p <user>:<permission>

Edit permission

cacls <file> /e /p <user>:<permission>

Change owner

cacls <file> /r <user>

icacls

Reference

icacls <file> <option>
OptionDescription
/tTraverse subdirectories
/cContinue on file error
/lPerforms on a symbolic link, not its destination
/setowner <user>Changes the owner
/resetReplaces with default inherited ACLs
/grant[:r] <user>:<permissions>Grants specified user access rights
:r means replace previously granted explicit permissions
/deny <user>:<permissions>Denies specified user access rights
/remove[:g|:d] <user>Remove access rights of specified user from DACL
:g = Grant
:d = Deny

Permission syntax

[(OI)][(CI)][(IO)][(NP)][<simple permission>[...]](<permission>[,...])

Permission

InheritDescription
(OI)Object Inherit
(CI)Container inherit
(IO)Inherit only
(NP)Do not propagate inherit
Simple permissionDescription
FFull access
Mmodify access
RXRead and execute access
RRead-only access
WWrite-only access
PermissionDescription
DDelete
RCRead control
WDACWrite DAC
WOWrite owner
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