1

The scenario is as follows:

  • A program that's executed with admin rights creates a folder, "C:\my folder".
  • In cmd, I want to grant full control of this folder to everyone.

How can I do it? I tried

cacls "C:\my folder" /E /P "*S-1-1-0":F

and didn't work. I also tried

cacls "C:\my folder" /E /P "Everyone":F

and didn't work. Yet,

cacls "C:\my folder" /E /P "Todos":F

did work -- where "Todos" stands for "Everyone" in a Spanish installation of Windows. How can I accomplish this no matter what language Windows was installed with?

NOTE: I know cacls is supposed to be deprecated in favour of icacls. I don't mind. Please, don't waste your time pointing it out, unless there is a way to achieve this in icacls.

Eryk Sun
  • 33,190
  • 5
  • 92
  • 111
glezo
  • 742
  • 2
  • 9
  • 22

2 Answers2

1

Try this one:

icacls "C:\my folder" /grant Everyone:M

Taken from here.

Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
John Doe
  • 39
  • 1
  • 5
  • 1
    Not working. I think (yet not entirely sure) anyhing related with "Everyone" won't just work on a spanish windows – glezo Jul 31 '17 at 08:01
0

In my own dispare, I finally managed to figure it out:
icacls "C:\my folder" /GRANT *S-1-1-0:F
This is funny: I figured it out by means of technet.microsoft.com, YET, THEIR OWN DOCUMENTATION IS WRONG!!!
IN https://technet.microsoft.com/es-es/library/cc753525(v=ws.10).aspx they state you should use
Icacls test2 GRANT *S-1-1-0:(d,wdac)
when you should actually use
Icacls test2 /GRANT *S-1-1-0:(d,wdac)

glezo
  • 742
  • 2
  • 9
  • 22
  • The example is correct in the original English version of the article. The automatic translation to Spanish breaks it. – Eryk Sun Jul 31 '17 at 10:26
  • Wrong documentation, as I stated before. – glezo Aug 09 '17 at 13:31
  • 1
    In Spanish you're looking at an *automatically* translated document from the *correct* English version, and somehow the translation software messes up the example. – Eryk Sun Aug 09 '17 at 13:36