You are not logged in.
Pages: 1
please how can use icacls to deny users from file and directories deletion recursively,i tried the following code and it didn't work
set "root=d:\TestFolder"
for %%G in (%root%) do (
takeown /f "%%~G" /r /d Y
Icacls "%%~G" /Deny "%username%":d /T /C & rem this sets the permission but not recursively
Icacls "%%~G" /Deny "%username%":(OI)(CI)d /T /C & rem this outputs the error "(CI)d was unexpected."
Icacls "%%~G" /T /C (OI)(CI) /Deny "%username%":D & rem this outputs the error "(CI) was unexpected."
)
Last edited by boushta (23 Dec 2014 20:03)
Offline
Pages: 1