Linux and Unixish system comes with chmod and other commands to setup/change access permission from command line/shell.
However, when it comes to windows chmod is not available. Windows comes with a special command line utility called CACLS.
You can use it as follows:
CACLS files /e /p {USERNAME}:{PERMISSION}
Where,
- /p : Set new permission
- /e : Edit permission and kept old permission as it is i.e. edit ACL instead of replacing it.
- {USERNAME} : Name of user
- {PERMISSION} : Permission can be:
- R - Read
- W - Write
- C - Change (write)
- F - Full control
For example grant Rocky Full (F) control with following command (type at Windows command prompt):
C:> CACLS files /e /p rocky:f
Read complete help by typing following command:
C:> cacls /?
Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!
- Email this to a friend
- Printable version
- Rss Feed
- Last Updated: Apr/11/2006
{ 2 comments… read them below or add one }
You can use *.* in place of files to change access mode of multiple files at a time.
Super dude.. i got in a right time.. thanks for your contribution and sharing of knowledge..keep doing..