Windows Vista: modify file permissions from the command line
October 14, 2008 23:26:09 Last update: October 14, 2008 23:27:31
Use the
To save the DACLs for all files in the
To restore the DACLs for every file within ACLFile that exists in the
To grant the user
To grant the user defined by
The
icacls command to display or modify discretionary access control lists (DACLs) on specified files.
To save the DACLs for all files in the
C:\Windows directory and its subdirectories to the ACLFile file, type:
icacls c:\windows\* /save aclfile /t
To restore the DACLs for every file within ACLFile that exists in the
C:\Windows directory and its subdirectories, type:
icacls c:\windows\ /restore aclfile
To grant the user
User1 Delete and Write DAC permissions to a file named Test1, type:
icacls test1 /grant User1:(d,wdac)
To grant the user defined by
SID S-1-1-0 Delete and Write DAC permissions to a file named Test2, type:
icacls test2 /grant *S-1-1-0:(d,wdac)
The
icacls command line utility is a partial replacement for cacls.