Using icacls.exe command line utility to set NTFS permissions on folders and files

Below is the syntax for:
Simple example:
icacls C:\Windows /grant Administrator:F
Will grant the user Administrator Full permission to C:\Windows folder

Advanced example:
icacls C:\Windows /grant Administrator:(OI) (CI)F /T /C
Will grant the user Administrator Full permission to C:\Windows folder and subfolders and files, operation will continue on all file errors and set inheritance flag as Object interitance, Container inheritance

inheritance rights may precede either form and are applied only to directories:
(OI) - object inherit
(CI) - container inherit
(IO) - inherit only
(NP) - don't propagate inherit

/T indicates that this operation is performed on all matching files/directories below the directories specified in the name.

/C indicates that this operation will continue on all file errors. Error messages will still be displayed.

Comments

Popular posts from this blog

vRA/vRO workflows

How to generate HPS Report for Windows