Summery

icacls is Windows’ command-line tool for viewing and modifying file/folder ACLs (Access Control Lists). It lets you grant, deny, or audit permissions for users/groups on files and directories - kinda like Linux’s chmod but for NTFS.

Commands

icacls file.txt - Check the user’s rights over a file
icacls folder - Check the user’s rights over a folder
icacls file.txt /inheritance:e - Restores inheritance permissions from parent folder to that file

Dictonary

Because icacls output is strange, here’s a table of what each letter meants:

MaskPermissions
FFull access
MModify access
RXRead and execute access
RRead-only access
WWrite-only access
I just means that the a given permissions was inherited from the directory

There are also few generic permissions that you might see:

MaskMeaning
GAGeneric All ~ F
GRGeneric Read ~ R
GWGeneric Write ~ W
GXGeneric Execute ~ X

There is also a bunch of others, but they are used way less:

MaskMeaning
DDelete
WDACWrite DAC (change permissions)
WOWrite owner (take ownership)
RCRead control (read security descriptor)
XExecute / traverse folder
RDRead data / list directory
WDWrite data / create files
ADAppend data / create folders
RARead attributes
WAWrite attributes
REARead extended attributes
WEAWrite extended attributes
SSynchronize
OIPermissions are inherited by files inside the folder
CIPermissions are inherited by subfolders

References

Similar commands: Get-ACL