The authorization is given to the user that enables them to access specific resources on the n/w, such as a data file. Our first priority is protection and security.

On a Linux system, each file and directory are assigned access rights for the owner of the file, the members of a group of related users, and everybody else. Rights can be assigned to read a file, write a file, and to execute a file.

Effect on a file:

Read (r): contents of the file can be read.

Write (w): The contents of the file can be changed.

Execute (x): The file can be executed as a command.

Effect on directory:

Read (r): contents of the directory can be listed.

Write (w): any file in the directory may be created or deleted.

Execute (x): The contents of the directory can be accessed.

There are two methods to set permission:

  1. Symbolic method:

Read                                      -r

Write                                     -w

Execute                                – x

No permission                   —

2. Numeric

Read                                      -4

Write                                     -2

Execute                                – 1

No permission                   -0

Also read,

Setting Linux permissions for files and folders:

For User:

#chmod u+rwx folder name/filename

                U             = user

                +             = add

                rwx        = permission

#chmod u-rwx folder name/file name

                U             = user

                –              = remove

                rwx        = permission

For Group:

#chmod g+rwx folder name/file name

                g              = group

                +             = add

                rwx        = permission

#chmod g-rwx folder name/file name

                g              = group

                –              = remove

                rwx        = permission

For others:

#chmod o+rwx folder name/file name

                o             = other

                +             = add

                rwx        = permission

#chmod o-rwx folder name/file name

                o             = other

                –              = remove

                rwx        = permission

To set all:

#chmod u+rwx, g+rwx, o-rwx folder name/file name

  • Numeric method:

#chmod 765 folder name/file name (777 for full permission)

7- user:                 r w x      4+3+1=7

6-group:               r w –       4+2+0=6

5-others               r – x        4+0+1=5

  Number     Permission Type     symbol
0 No permission –      –
1 Execute –      x
2 Write w     –
3 Execute + write w     x
4 Read r       –      –
5 Read + x                r       –      x 
6 Read + w                r      w     –
7   R +w + x            r      w    x

To change group ship:

#chgrp (group name)(file name)

To change ownership:

#chown (user name) (file name)

For any further assistance please contact our support department.


Vishwajit Kale

Vishwajit Kale blazed onto the digital marketing scene back in 2015 and is the digital marketing strategist of Hostdens, a company that aims to provide reliable web hosting solutions. Vishwajit is experienced in digital and content marketing along with SEO. He's fond of writing technology blogs, traveling and reading.