Cacls.exe
Display or modify access control lists (ACLs) for a file
CACLS filename [/T] [/E] [/C] [/g user:perm] [/R user [...]]
[/P User:perm [...]] [/d User [...]]
FileName Displays the ACL.
/T Change the current directory and all of its subdirectories
Specifies the ACL for the file.
/e Edit the ACL without replacing it.
/C Continue when an Access denied error occurs.
/g User:perm gives the specified user access rights.
Perm can be: R read
W Write
C Change (write)
F Full Control
/r user revokes the access rights of the specified user (only valid when used with/E).
/P User:perm replaces the access rights for the specified user.
Perm can be: N None
R Read
W Write
C Change (write)
F Full Control
/d user denies access to the specified user.
You can use wildcard characters to specify multiple files in a command.
You can also specify multiple users in the command.
Abbreviation:
CI-Container inheritance.
The ACE is inherited by the directory.
OI-Object inheritance.
Aces are inherited by files.
IO-Inherit only.
The ACE does not apply to the current file/directory.
filename--displays an Access control list (hereinafter referred to as an ACL);/t--changes the acl;/e--edit ACL of the specified file in the current directory and all its subdirectories without replacing it;/c--continues when an access denied error occurs;/g user:perm--gives the specified user access rights. Perm can be R (read), W (write), C (change, write), F (Full Control),/R user--revoke the access rights of the specified user (only for use with/E),/p user:perm--Replace the access rights of the specified user;/d user--deny access to the specified user.
1. View directories and ACLs as an example of Windows XP system, I use the cacls command to view the e-disk CCE Directory access control permissions. Click "Start → run", enter "CMD" command in the Run dialog box, pop Up the command prompt dialog box, enter "Cacls CCE" command at "e:\>" prompt, then list the access Control permission items of user group and user to CCE directory in Windows XP system. If you want to view all file access control permissions in the CCE directory, enter "Cacls cce\." command.
2. Modify directory and ACL settings user access: We often have to modify the directory and file access permissions, using the CACLS command is easy to do. The following is to give the native user Chenfeng Full control of the files in the CCE directory and all its subdirectories under e-disk. Enter the "Cacls cce/t/e/c/g chenfeng:f" command in the Command Prompt dialog box.
Replace user access: Replaces the full control of the native user Chenfeng with read-only permissions. Enter the Cacls cce/t/e/c/P chenfeng:r command in the Command Prompt dialog box.
Revoke user access: It is also easy to revoke full control of this directory by the native user Chenfeng, run "Cacls cce/t/e/c/R Chenfeng" at the command prompt.
Deny user access: To deny user Chenfeng access to files in the CCE directory and all subdirectories, run "Cacls cce/t/e/c/D chenfeng".
Modify File access Permissions