1

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: enter image description here

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.

  • 2
    Check the advanced permissions window ;) – Felipe Martinez Pineda Jan 31 '17 at 15:09
  • The advanced window shows the rights I am trying to set, but the application that depends on the rights still does not work. It does work, however, when I manually grant the Read and List folder contents in the dialog. So, I want exactly the same effect on the command line – mark Jan 31 '17 at 18:34
  • You could try setting the permissions by hand. Next you run the command 'icacls [folderpath]'. It shows what permissions the user has. You can reuse that syntax. – ZEDA-NL Feb 6 '17 at 11:02
  • @ZEDA-NL - please, arrange your comment as an answer, because it worked! The right permissions turn out to be (OI)(CI)(RX) – mark Feb 11 '17 at 5:21
1

You could try setting the permissions by hand. Next you run the command 'icacls [folderpath]'. It shows what permissions the user has. You can reuse that syntax.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.