How To Be Mastering Command Prompt #5 CACLS




CACLS is a command in cmd.exe (command prompt) to display or modifies access control of files

Here's the formula for use CACLS:


     CACLS filename [/G user:perm][/R user [...]] [/P user:perm [...]] [/D user [...]]

 Filename Displays ACLs.
/T                  Changes ACLs of specified file the current directory and all
    /G user:perm  Grant specified user access right
    Perm:    
    R     Read
       Write
    C    Change (write)
    F    Full control
    /P user:perm    Replace user access right
       Read
    W    Write
    C    Change (Write)
    F    Full control
    /D user        Deny specified user access
    
    Example (assume there is a file with name abc.txt  we modify access for guest account):
    Display access control -> cacls abc.txt

 
    Change user’s access right (to be read-only) -> cacls abc.txt /p cybersys:r

    Change user’s access right (to be full control) -> cacls abc.txt /p cybersys:f


Picture 1. Display access control (ACL)




Picture 2. Set access control for guest account

Just that, I hope this tutorial is useful. Thank for your visiting. Please type your comments for this tutorial..


No comments:

Post a Comment