Icacls, syntax question.


  1. Posts : 11
    x86
       #1

    Icacls, syntax question.


    I want to give interactive user folder permissions, with icacls.
    But I canīt find the correct syntax for the interactive user.

    e.g.
    icacls folder1 /grant user1:(M) ---> Works very well. User1 gets modify rights to the folder "folder1".

    Now I want to give interactive user the same modify rights.
    icacls folder1 /grant INTERACTIVE:(M)

    But that syntax does not work. Anyone that can help?
      My Computer


  2. Posts : 9,582
    Windows 8.1 Pro RTM x64
       #2

    What do you mean by interactive user? If you mean the currently logged in user, then this syntax will not work. With this command, you need to repeat it and explicitly name each user for whom you wish to grant rights to.
      My Computer


  3. Posts : 11
    x86
    Thread Starter
       #3

    Dwarf said:
    What do you mean by interactive user? If you mean the currently logged in user, then this syntax will not work. With this command, you need to repeat it and explicitly name each user for whom you wish to grant rights to.
    The syntax icacls folder1 /grant *S-1-5-4:(M), should work.

    Here you can read some more about Windows security identifiers,
    http://technet.microsoft.com/en-us/l...8WS.10%29.aspx
    Last edited by Dwarf; 25 May 2011 at 07:41.
      My Computer


  4. Posts : 9,582
    Windows 8.1 Pro RTM x64
       #4

    I'm not particularly familiar with this command. However, do you have a sub-key in the registry under HKEY_USERS called S-1-5-4? See if the syntax works with one of the keys that is there. I suggest S-1-5-21.
      My Computer


  5. Posts : 9,582
    Windows 8.1 Pro RTM x64
       #5

    Strange. I've just tried it on a dummy folder, and it appears to have worked.

    Code:
    Microsoft Windows [Version 6.2.7955]
    Copyright (c) 2011 Microsoft Corporation.  All rights reserved.
    
    C:\Windows\system32>icacls c:\users\cyclops\desktop\test /grant cyclops:(m)
    processed file: c:\users\cyclops\desktop\test
    Successfully processed 1 files; Failed processing 0 files
    
    C:\Windows\system32>icacls c:\users\cyclops\desktop\test /grant *S-1-5-4:(m)
    processed file: c:\users\cyclops\desktop\test
    Successfully processed 1 files; Failed processing 0 files
    
    C:\Windows\system32>
      My Computer


  6. Posts : 11
    x86
    Thread Starter
       #6

    Dwarf said:
    Strange. I've just tried it on a dummy folder, and it appears to have worked.

    ...
    Yep, works fine for me too. Iīm happy I found a solution.
      My Computer


  7. Posts : 9,582
    Windows 8.1 Pro RTM x64
       #7

    You're welcome. Did you find out what was causing the error? I'm guessing something in the syntax.
      My Computer


  8. Posts : 11
    x86
    Thread Starter
       #8

    I found the solution on another forum, I just wanted to share.
      My Computer


  9. Posts : 9,582
    Windows 8.1 Pro RTM x64
       #9

    Ahh, I think I get it now. You mean you needed to substitute *S-1-5-4 for INTERACTIVE, correct?
      My Computer


  10. Posts : 11
    x86
    Thread Starter
       #10

    Dwarf said:
    Ahh, I think I get it now. You mean you needed to substitute *S-1-5-4 for INTERACTIVE, correct?
    Exactly. I didnīt know about the SID syntaxes, S-1-5-4 e.g.
    Another way is of course to right-click on a folder and
    give out permissions via properties, but that is not a solution for software
    distribution.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Đ Designer Media Ltd
All times are GMT -5. The time now is 02:33.
Find Us