Permissions in linux
Permission Groups
There are three user based permission groups for each file and directory:-
- Owner(u) – The owner permissions apply only the owner of the file and directory.
- Group(g) – The group permissions apply only to the group that has been assigned to the file and directory.
- All users(o) – The all user permissions apply to all the users on the system.
Permission Types
Each file or directory has three basic permission types:-
- Read(r) – The read permission allows to read the content of the file.
- Write(w) – The write permission allows the users to write or modify the content of the file and directory.
- Execute(x) – The execute permission allows the users to execute a file or view the content of a directory.
Octal Digit |
Text Equivalent |
Binary Value |
Meaning |
0 |
— |
000 |
All types of access are denied |
1 |
–x |
001 |
Execute only |
2 |
-w- |
010 |
Write only |
3 |
-wx |
011 |
Read only |
4 |
r– |
100 |
Read access is allowed only |
5 |
r-x |
101 |
Read and execute access are allowed |
6 |
rw- |
110 |
Read and write access are allowed |
7 |
rwx |
111 |
Everything is allowed |