1

I would like to create a folder with permissions similar to my home directory. I tried giving myself full control etc. but I managed to get locked out and had to use the takedown tool to be able to delete the directory.

I know Deny permissions take precedence over Allow but that's about it. This is for Windows Server 2012R2.

pyb
  • 216
  • 2
  • 7

1 Answers1

1

Use /inheritance:r to remove all the inherited ACEs and /grant to add in the permissions you want the directory to have. You can do this in a single command, like:

icacls test /inheritance:r /grant me:(OI)(CI)(F) /grant Administrators:(OI)(CI)(F)

Do not use the /deny option. There are rare cases where deny entries are useful, but this isn't one of them.

Harry Johnston
  • 6,005
  • 4
  • 35
  • 52