I am trying to grant a read-only access to my temp directory to another user from the command line using icacls.exe.
Tried the following (PowerShell):
- icacls.exe $env:TEMP /grant mydom\user:R
- icacls.exe $env:TEMP /grant 'mydom\user:(GR)'
- icacls.exe $env:TEMP /grant 'mydom\user:(GR,X)'
- icacls.exe $env:TEMP /grant mydom\user:F
No matter what I try when I check the permissions I get the same picture:
The user is added to the list of the users - fine, but it shows no permissions.
So, what is the right way to do it? Using icacls is not necessary, any command line way is fine.