Showing posts with label permissions. Show all posts
Showing posts with label permissions. Show all posts

17.1.10

File permissions in linux - explained

Linux is often used as a multi-user system and it is not desirable that all users have access to all files and directories.
For eg. : On a multi-user environment in a office using a central server running linux , it might be required the accountants documents be shared between employees of the accountants department . At the same time, it might be undesirable and indeed dangerous if anyone having access to the server is able to read/edit them.

Linux has a 3X3 permission system.

There are 3 levels of security for a file :

Read Permission : Permission to read a file (r)
Write Permission : Permission to edit a file (w)
Execute Permission : Permission to execute a file if it is executable (x)

and 3 different levels for a directory :

Enter Permission : Permission to Enter into the Directory
Show Entry : Permission to see the contents of the Directory
Write Entry : Permission to make a new file or subdirectory in the Directory

For granting the above permissions, users are divided into 3 different sets

User : The owner of the file/directory - mostly the person who created the file/directory
Group : Linux users can be divided in groups and one user can be a member of more than one group. A Group denotes all users who are members of group(s) to which the owner of a file/directory belongs
Others : All users not in the group(s) of the owner.