Octal Permissions
Octal | Permission |
0 | |
1 | _ _ x = execute |
2 | _ w _ = write |
3 | _ w x = write,execute |
4 | r _ _= read |
5 | r _ x = read,execute |
6 | r w _ = read,write |
7 | r w x = read,write,execute |
Examples
Ensure that your home directory is not writeable by other users.
chmod g-w,o-w ~
To assign others segment read permissions only
sudo chmod o=r file1.txt
Assign different permissions to file, group and others
chmod u=rwx,g=rw,o=r filename.txt
Set file permissions of file1.txt to be the same as those of file2.txt
chmod --reference=file2.txt file1.txt
Related
- How to Create a Command Alias in Linux
- Find Command in Linux
- Linux Groups
- Linux Users
- Displaying Network Statistics in Linux
- Compress and Extract Files Using the tar Command on Linux
- Linux IP Essentials
- Linux Routing Essentials
- EdgeMax CLI Basics
Links
- https://en.wikipedia.org/wiki/Chmod