Using the CACLS command to set server file access rights _ Server
Source: Internet
Author: User
The CACLS command uses the following format:
CACLS filename [/T] [/e] [/C] [/g user:perm] [/R user [...]]] [/P User:perm [...]] [/d User [...]]
filename--Displays the Access control list (ACL),/t--changes the acl;/e--edit ACL for the specified file in the current directory and all subdirectories,/c--continues when an Access denied error occurs, and/g gives the specified user access. Perm can be R (read), W (write), C (change, write), F (Full Control),/R user--revoke the access rights of the specified user (used only with/e),/p user:perm--to replace the specified user's access rights,/D user--deny access to the specified user.
1. View directories and ACLs
Take Windows XP system as an example, the author uses 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 Command Prompt dialog, enter "Cacls CCE" at the "e:\>" prompt, and then list the user groups and users ' access control rights to CCE directory in the Windows XP system. If you want to view all file access control permissions in the CCE directory, enter Cacls Cce\. "command.
2. modifying directories and ACLs
Set User access rights: We often want to modify the directory and file access rights, using the CACLS command is very easy to do. The following gives the native user TestUser Full control of the files in the test directory under D disk and all of its subdirectories. In the Command prompt dialog box, enter the Cacls test/t/e/c/g testuser:f command.
Replace User access rights: Replace the Full Control permissions of the native user testuser with read-only permissions. In the Command prompt dialog box, enter the Cacls test/t/e/c/P testuser:r command.
Revoke user access: To revoke a native user testuser Full control of the directory is also easy to run "Cacls test/t/e/c/R testuser" at the command prompt.
Deny user access: To deny user testuser access to files in the test directory and all of its subdirectories, run the Cacls test/t/e/c/d testuser.
The above is just a brief introduction to the use of CACLS commands, we recommend that you try it, you will find that it has a lot of wonderful features.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service