UNIX can be accessed by multiple users simultaneously. Linux is essentially a cloned version UNIX that can be used in mainframes and servers without modification. This raises security concerns as any unauthorised or malicious user could alter, remove, or corrupt sensitive data.
Linux’s file permissions are a major part of its defense against unauthorised user access. Although there are many security features built into Linux systems, granting local access can lead to serious vulnerabilities. It is important to give the correct permissions to files and directories.
Groups of Permissions for Linux
Each directory and file in Linux has permissions for three user-based groups.
owner – Only the owner or creator of a file or directory has access to owner permissions. This permission does NOT affect other users’ actions.
group – Group permissions only apply to the group to which the file/directory was assigned. Group permissions won’t affect the actions of other users.
All users – Linux grants all users permissions to all other users on a system. This permission has the greatest potential for misuse.
Types of Permissions
Three basic types of permissions are available for files and directories in Linux:
Read – This permission allows the user to view or read the contents of a file.
Write – This permission allows the user to modify files or directories and allows them to write into them.
Execute – This permission allows users the ability to view or execute files in a directory.
Linux Permissions:
To view the permissions of a directory or file,
In your GUI File Manager, check the permissions for a file or directory.
While working in the directory containing your file, and while you are in the terminal, review the output of the Is -I command.
The command line displays the permissions of a directory or file as follows:_rwxrwxrwx1 owner:group
Permissions/rights for users:
The special permission is shown as the first character with an underscore. It varies with changes.
The owner permissions are the next set of 3 characters in rwx.
The next set of three characters refers to group permits.
The last set of 3 characters refers the all users permission.
The integer or number displayed after these characters refers the number of hard links a file has.
The last piece of the command is the assignment of Owner and Group. This is why the formatting of Owner:Group.
Explicitly Defining Permissions
You must refer to each Permission Type and Permission group in order to explicitly define permissions in Linux.
The permission groups are denoted as follows:
u – owner
g – group
o – Others
a – All Users
Potential Assignment Operators are plus (+) or minus (-),, which tell systems whether to remove a specific permission or add it.
The Permission Types are indicated as:
r –