batch-filewindows-8permissionscaclsicacls

icacls Deny Everyone Directory Delete Permission


I am trying to deny all users from being able to delete a folder (as well as its contents, if possible).

What I currently have is not working.

icacls pics /deny Everyone:(OI)(CI)(DE)

Using the above line neither protects the folder nor its content as I can still delete the folder and all files within it.


Solution

  • I think i found a solution:

    icacls pics /deny Everyone:(OI)(CI)(DE,DC)
    

    which denies the specific rights to delete (DE) and to delete childs (DC).