Chmod command
From Linux Shell Scripting Tutorial - A Beginner's handbook
This article is a stub. You can help us by expanding it.
The 'chmod command is used to change the access permissions of a file. The syntax is as follows:
chmod ugo+rwx filename
Where,
- u : Users
- g : Groups
- o : Others
- + : Adds the permission
- - : Removes the permission
- = : Overwrites current permissions
- r : Read permission
- w : Write permission
- x : Execute permission
A numerical way to express permission is as follows:
- 4 : Read permission
- 2 : Write permission
- 1 : Execute permission
- 7 : Read, write, and execute permissions
- 0 : No permissions at all