File permissions in Linux can be also represented in digits from 0-7 for the owner, group and others with reading as the most significant bit (E.g., the value 6 represents the permission right rw- for a file). Suppose a file in Linux has the permission as the digits 764. • What does this permission right indicate for the owner/user, group and others? • What is the letter representation of this permission right?
As we know that security is a big cincern for Linux which is a
clone of unix the multi user operating system. This is why for
effective security linux divides authorization into two
levels
1. Ownership
2. Permissions
Now lets talk about he Ownership
Every file and directory in your Unix or Linux is assigned three
types of owner , these are
I. User/Owner - A user is the owner of the file.
By default a person who created a file becomes its Owner hence a
user is also sometimes called an Owner
II. Group - A user group can contain multiple
users. All users belonging to a group will have the same access
permissions to the file so you can add many users to a group and
assign group permissions to a file only group members can read or
modify them
III. Other - Who is any other user who has access
to a file. This person has neither created the file nor does he
belong to a user group which owns the file.
Now the question is how does Linux distinguish between these three
user types so that a user A can not affect a file which contains
some other user B's vital information.
Now let us understand the Permission system on
linux
Every file or directory in your linux or unix system has three
permissions these are Read, Write, and Execute define for all the
three user.
I. Read permission - This permission gives you the authority to
open and read a file.
II. Write Permission - The Write permission gives you the authority
to modify the contents of the file.
III. Execute permission - In windows an executable program usually
has an extension exe which means you can easily run
For example in the sample file like ----rw-r-- , the user do not
have permission to execute, hence we would get an error
message
In linux we can just type the command : $ ls -l , to list the file
permissions
In permission window , r = read permission
w = write permission
x = excute permission
- = no permission
Now we come to our permission as 764
for this lets make a table
Number | Permission type | Symbol |
0 | No Permission | --- |
1 | Execute | --x |
2 | Write | -w- |
3 | Execute + Write | -wx |
4 | Read | r-- |
5 | Read + Execute | r-x |
6 | Read + Write | rw- |
7 | Read + Write + Execute | rwx |
From the above table we can write the permission 764 as
rwxrw-r--
It gives Read , Write, Execute permission to the User or
Owner
Read and Write permissions for the group
and read only permission to the other.
Hope this answer will help you
Thank you!!
Get Answers For Free
Most questions answered within 1 hours.