Icacls

Some commands that I use to modify access control lists on specified files or folders

Configuration

Commands

Reset ACL

PS C:\Users\Administrator> takeown /A /R /F D:\FOLDER
PS C:\Users\Administrator> icacls D:\FOLDER /reset /T /C

Delete heritance

PS C:\Users\Administrator> icacls D:\FOLDER /inheritance:r /T /C

Set ACLs

PS C:\Users\Administrator> icacls "D:\FOLDER" /grant:r "domain.local\users":(OI)(CI)(RX,D) "domain.local\Administrator":(OI)(CI)(F) SYSTEM:(OI)(CI)(F) Administrators:(OI)(CI)(F) /T /C

Remove user

PS C:\Users\Administrator> icacls "c:\$Windows.~BT" /remove:g SYSTEM

Add a user with full rights

PS C:\Users\Administrator> icacls "c:\$Windows.~BT" /grant users:(OI)(CI)(F)

Deny rights to a user

PS C:\Users\Administrator> icacls "c:\$WINDOWS.~BT" /deny SYSTEM:(OI)(CI)(F)
Licence Creative Commons
This website http://shebangthedolphins.net is licensed to the public under a licence Creative Commons Attribution licence.
Contact :