Scott
Scott

Reputation: 86

icacls function not overwriting the previous directory permissions

I am using the following code:

icacls C:\testscott\ /grant:r "TestGroup":(NP)F

However, the existing permissions in the directory C:\testscott\ are still there. I thought using the /grant:r option meant it would overwrite the existing permissions?

Upvotes: 1

Views: 3405

Answers (1)

Harry Johnston
Harry Johnston

Reputation: 36318

To replace all permissions on a directory with newly assigned ones:

icacls c:\test /reset
icacls c:\test /inheritance:r /grant Administrators:(OI)(CI)(F)

Upvotes: 2

Related Questions