How to set permissions on directory?
16,562
Use the icacls command:
icacls "%ProgramFiles(x86)%\folder" /grant "Domain Users":f /t /q
This command will grant read/write permissions to all domain users in folder
and all files and subfolders in it.
Explanation:
/grant
:r Read Access
user:permission
:f Full access
/t Traverse all subfolders to match files/directories.
/q Quiet - supress success messages.
Related videos on Youtube
Author by
VidyaEvolution
Updated on September 18, 2022Comments
-
VidyaEvolution over 1 year
I am searching for a way to set permissions on folder and the contents.
The rule is as such that the only the superuser can delete contents of the folder. Users can add, view, modify, but not delete the files in the directory.
-
Arvind Jha over 11 yearsWhich OS do you use?
-
dsolimano over 11 yearsAre you concerned about users deleting files but not, for example, opening them up and deleting all of the contents?
-
-
VidyaEvolution over 11 yearsMAC OS X 10 Lion
-
VidyaEvolution over 11 yearsThank you for the solution. This will work with windows only. I am currently using Mac OS X Lion.