Cloud Linux

Methods To Manage Linux File Permission

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.
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.

Leave a Comment
Share
Published by
Vishwajit Kale

Recent Posts

Green Data Centers To Have Strong Impact On Data Processing And Hosting Service Businesses

About Bizvibe Bizvibe is a B2B online platform that helps in connecting buyers and sellers…

3 years ago

File Server Security Is Important for An Organization: Find out How

File server investment is the smart investment anyone can make for their business. It has…

3 years ago

Cloud Computing Explained

Because of the many advantages of the cloud, people are moving more and more towards…

3 years ago

Cloud to which more and more companies are moving advanced workloads

Cloud Adoption Accelerates IT Modernization. More and more online businesses are increasing more and more…

3 years ago

History of web hosting

Almost more than half of the total world’s population were using the internet by any…

3 years ago

Plesk appoints ZNet Technologies as a global distributor to expand reach in untapped markets

Plesk is an IT service provider company which was founded in 2000 by Dimitri. The…

3 years ago

This website uses cookies.