Every files & folder has three permissions.
These three permissions are defined for three types of users given blow:
When we do triplet of these three users (3 types x 3 type of users), we get nine bit of information in other words we can say UNIX file permissions are nine bits of information.
Each bit has two values
Set bit is denoted by its corresponding operation letters(r,w, or x)
Clear bit is denoted by dash (-)
Let me explain by this example for better understanding.
File with this permission means -rwxr-xr-x
The owner of the file has all permissions like read, write & execute but the group owner & rest of the user can only read & execute this file.
File Types:
Almost all file types are represented by preceding the permissions by one of these:
See more examples to clear these file types
File with permission: drwxr-xr-x
In this permission "d" represent that the permissions are for directory & the owner of file has all access but other can only read & execute.
File with permission: -rw-------
This file permission means the owner & all access but all other & users have no access.
Here is the octal representation of file permission
R W X
4 2 1
Here 4 stands for read only, 2 stands for write only & 1 stand for execute only.
See this table shows to check what numeric values mean:
How to understand permissions
644 it means owner has read & write permissions , groups & others have only read permissions.
755 means owner has all permissions but groups & other have read & execute.
777 means all user have all permissions.
Read more about this in next post...............
- Read access (r)
- Write access (w)
- Execute access (x)
These three permissions are defined for three types of users given blow:
- Owner of the file or Owner
- Groups that belongs to owner or Groups
- Other users or All
When we do triplet of these three users (3 types x 3 type of users), we get nine bit of information in other words we can say UNIX file permissions are nine bits of information.
Each bit has two values
- Set
- Clear
Set bit is denoted by its corresponding operation letters(r,w, or x)
Clear bit is denoted by dash (-)
Let me explain by this example for better understanding.
File with this permission means -rwxr-xr-x
The owner of the file has all permissions like read, write & execute but the group owner & rest of the user can only read & execute this file.
File Types:
Almost all file types are represented by preceding the permissions by one of these:
- - = Regular File
- d = Directory
- l = Symbolic Link
- b = Block Special Device
- c = Character Device
- s = Unix Socket (local domain socket)
- p = Named Pipe
See more examples to clear these file types
File with permission: drwxr-xr-x
In this permission "d" represent that the permissions are for directory & the owner of file has all access but other can only read & execute.
File with permission: -rw-------
This file permission means the owner & all access but all other & users have no access.
Here is the octal representation of file permission
R W X
4 2 1
Here 4 stands for read only, 2 stands for write only & 1 stand for execute only.
See this table shows to check what numeric values mean:
How to understand permissions
644 it means owner has read & write permissions , groups & others have only read permissions.
755 means owner has all permissions but groups & other have read & execute.
777 means all user have all permissions.
Read more about this in next post...............
Comment