Search code examples
windowscacls

cacls set permission for everyone


Scenario is as follows:
-Execute cmd with admin privileges
-mkdir a new folder, let there be jzzz
-How can you grant full privileges to all users in the system, by means of cacls?
[Note that I mentioned cacls, not icacls]
I've tried
echo S | cacls "C:\\jzzz" /t /g Todos:f
with no result at all. (Keep in mind it's on a spanish installation, where 'S' stands for 'Y'es and 'Todos' stands fro 'Everyone'

Thanks in advance!


Solution

  • Remove the space before the pipe: echo S| cacls ...

    If you don't want to deal with the different group names you could use a SDDL string instead: echo Y| cacls "c:\path" /T /S:"D:(A;OICI;FA;;;SY)(A;OICI;FA;;;WD)" You still have to deal with the echo unfortunately and /S: sets a new ACL, it does not support /G.