0

Perhaps someone could help me. I'd like to convert the following chmod commands to use on Windows 7 but my understanding is lacking.

/bin/chmod -R u+w,go-w,a+r somedirectory
/bin/chmod a+x anotherdirectory

Thank you greatly.

1 Answer 1

0

Here are a couple of examples taken from the cacls manual/help page.

Grant full control to User "Dean" to all files and subdirectories:

cacls somedirectory /e /t /p Dean:f

Add Read-Only permission to a single file

CACLS myfile.txt /E /G "Power Users":R

Add Full Control permission to a second group of users

CACLS myfile.txt /E /G "FinanceUsers":F

Now revoke the Read permissions from the first group

CACLS myfile.txt /E /R "Power Users"

Now give the first group Full-control:

CACLS myfile.txt /E /G "Power Users":F

Give the Finance group Full Control of a folder and all sub folders

CACLS c:\docs\work /E /T /C /G "FinanceUsers":F

It looks like the "/t" does the recursion into all files and subdirectories, and "/e" edits instead of replaces the access control list (permissions). You can use multiple options per command but I have been having trouble changing everything at once. Cacls looks like it wants specific groups and users as opposed to the o,g,a options.

Here's some more info from "cacls /?":

 /G user:perm  Grant specified user access rights.

              Perm can be: R  Read

                           W  Write

                           C  Change (write)

                           F  Full control

/R user       Revoke specified user's access rights (only valid with /E).

/P user:perm  Replace specified user's access rights.

              Perm can be: N  None

                           R  Read

                           W  Write

                           C  Change (write)

                           F  Full control

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .