Script NTFS Permissions Using SetACL
Filed under:
Deployment Solution
3rd Party Products, Automation, Scripting, Command Line
Submitted by CondorMan on 29 August, 2008 - 15:32.
If you ever need to script NTFS permission changes, SetACL is a powerful alternative to CACLS. Here is a command line that will use SetACL to grant full control to the Administrators and System accounts on folder and all subfolders:
SetACL.exe -on "C:\Program Files" -ot file -actn ace -ace "n:administrators;p:full" -ace "n:system;p:full" -actn clear -clr "dacl,sacl" -actn rstchldrn -rst "dacl,sacl"
(40 votes)
- Login or register to post comments
- 2382 reads
- Printer-friendly version















SetACL
Is there an advantage in using SetACL over CACLS?
SetACL has more options and
SetACL has more options and can do some of the tricky things cacls cannot. I prefer it for its speed advantage as well.
It also is more robust
In my experience CACLS hasn't been as reliable as SetACL.