Specifying permisions with icacls

1k views Asked by At

I want to allocate read only permission to "Everyone" on an empty folder so that the users are not allowed to change the folder name. However I want "Everyone" to be able to create/modify/delete files in the folder.

say the folder is called /fred/myfolder

I've tried

icacls /fred /grant Everyone:(OI)R

and

icacls /fred/myfolder /grant Everyone:(CI)R
icacls /fred/myfolder /grant Everyone:(OI)F

and various combinations to no avail. The documentation/my knowledge isn't great. Any help would be appreciated

1

There are 1 answers

0
Angus Walker On BEST ANSWER

I found the answer. I needed

icacls /fred /grant Everyone:(OI)R

Then i just needed

icacls /fred/myfolder /grant Everyone:(OI)(CI)(OI)F

These were the combinations that I found very useful:

(NP) This Folder Only.
(OI) This folder and files.
(CI) This folder and subfolders.
(OI)(CI) This folder, subfolders, and files.
(OI)(CI)(IO) Subfolders and files only.
(CI)(IO) Subfolders only.
(OI)(IO) Files only.