Here are a few useful commands to setup Windows file permissions.
take ownership of a folder(including files and subfolders)
Takeown /f foldername /r /d y
reset permission of folder (including all files and subfolders) to inherit
Icacls folder /reset /T
disable inheritance for a folder
icacls Folder/inheritance:d
Set read permission for AD group on folder and subfolder
Icalcs Folder /grant domain\Groupname:(OI)(CI)RX /T
Set modify permission for AD group on folder and subfolder
Icalcs Folder /grant domain\Groupname:(OI)(CI)M /T
Set listing permission for AD group to this folder only
Icacls Folder /grant domain\group:(X,RD)
Remove Permission from Folder and subfolder
Icacls folder /remove domain\group

Related Works

No comment yet, add your voice below!


Add a Comment

Your email address will not be published. Required fields are marked *