Difference between revisions of "Reset NTFS ACLs"

From PeformIQ Upgrade
Jump to navigation Jump to search
Line 22: Line 22:
=ICACLS=
=ICACLS=


See - https://technet.microsoft.com/en-us/library/cc753525.aspx
See:
 
* https://technet.microsoft.com/en-us/library/cc753525.aspx
* http://ss64.com/nt/icacls.html


Examples:
Examples:

Revision as of 11:56, 3 June 2016



NTFS is a much more fine-grained than Unix.

The following commands take ownership and reset the ACLs to default.

Also, if the drive permissions themselves are mangled, you will need to fix those as well.

Assuming the tree is rooted at C:\xxx:

Make local administrators group owner.

takeown /F C:\xxx /R /A /D Y

Reset ACLs to defaults.

icacls C:\xxx /reset /T /C /L /Q


ICACLS

See:

Examples:

icacls "dir\*" /q /c /t /reset

where

/reset - Replaces ACLs with default inherited ACLs for all matching files.
/t     - Performs the operation on all specified files in the current directory and its subdirectories.