Course: Linux Administration Bootcamp

Setting Files and Directory Permissions

This post talk about to set file and directory permissions. To assign different permissions to different types of users, such as the owner of the file and directories, group of the file and directories, and users who are not the owner of the file or directory. The “$ chmod” command is used for such purposes which means “change mode”.

In the terms of permissions, there are three kinds, such as write, read and execute. Two modes are available which are used to assign different permissions to files and directories. These are explained below:

Absolute mode: In absolute mode, different numbers are utilized to assign permissions.

Symbolic mode: Likewise, different symbols are used to assign permissions in symbolic mode.

Let’s have a look at the below-provided table to view and differentiate various permissions for files and directory setting through absolute and symbolic modes:

Permissions type Absolute Mode (numbers) Symbolic Mode (symbols)
no permission 0
execute 1 –x .
write 2 -w-
write and execute 3 -wx
read 4 r–
read and execute 5 r-x
read and write 6 rw-
read, write, and execute 7 rwx

We have described permissions types with detail for  performing several operations on directories and files. To perform these permissions types on your files and directories check out the given below video.

About the author

Maria Naz

I hold a master's degree in computer science. I am passionate about my work, exploring new technologies, learning programming languages, and I love to share my knowledge with the world.