Solved

change the security permission of some files and directories to “Everyone - Full Control”.

Posted on 2003-11-27
2
365 Views
Last Modified: 2013-12-04
I need to change the security permission of some files and directories to “Everyone - Full Control”.
I have the cacls command (“cacls c:\mydir\*.* /e /g everyone:f”) but the problem is that on some OS the Everyone group has a different name (like "Jeder" in German OS).
I need a command that can make this change without using the “everyone” word.

0
Comment
Question by:igalb
  • 2
2 Comments
 
LVL 84

Accepted Solution

by:
oBdA earned 250 total points
ID: 9831521
The "Everyone" group is a "well known group" with the SID S-1-1-0. You can use this information to extract the localized name.
Get SIDtoName.exe from Joeware.net:
http://www.joeware.net/win32/index.html
Then use a script like the following to set your permission; it's currently in test mode, it will only display the "cacls" command.

====8<----[Everyone.cmd]----
@echo off
setlocal
:: *** Retrieve the localized name of the "Everyone" group using sidtoname.exe:
for /f "tokens=2 delims=\" %%a in ('sidtoname.exe S-1-1-0 2^>NUL ^| find "[WellKnownGroup]"') do set Everyone=%%a
echo The local name of the Everyone group is %Everyone%.

:: *** Test mode: Remove the "ECHO" in fron of the next line to "arm" the script
ECHO cacls c:\mydir\*.* /e /g %Everyone%:f
====8<----[Everyone.cmd]----
0
 
LVL 84

Expert Comment

by:oBdA
ID: 10897012
May I ask for the reason of the "C"?

What's the right grade to give?
http://www.experts-exchange.com/help.jsp#hi73
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, a new law in my state forced us to get a top-to-bottom analysis of all of our contract client's networks. While we have documentation, it was spotty at best for some - and in any event it needed to be checked against reality. That was m…
Many of us in IT utilize a combination of roaming profiles and folder redirection to ensure user information carries over from one workstation to another; in my environment, it was to enable virtualization without needing a separate desktop for each…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question