Articles Comments

Computer Tips and Tricks | WordPress Technology Hints » Computer Tips and Tricks, Technology Tips » Linux file permissions explained

Linux file permissions explained

People who can access Linux files and folders if allowed, can fall into 3 specific categories:

  • Owner – User who created the file/folder
  • Group – Specific Group of Users
  • Public – Anyone else

They can have none, some or all of the permissions below:

  • r – Read permission. Whether the file may be read.
  • w – Write permission. Whether the file may be written to or modified.
  • x – Execute permission. Whether the file may be executed.

Permissions are given in groups of 3.

 The first 3 characters are the permissions for the owner of the file or directory.

The next 3 are permissions for the group that the file is owned by.

The final 3 characters define the access permissions for everyone not part of the group.

An example:

A file that is owned by root and has read write access for a group and read only access for everyone else would be displayed as:

rwxrw-r-

Numerical display

The above can also be displayed as a numerical value. A derivative of the binary system the list of numbers ranges from 0 to 7 (all 0’s to all 1’s for the first decimal numbers 1, 2, 4)

  4 (r) 2 (w) 1 (x)
0 0 0 0
1 0 0 1
2 0 1 0
3 0 1 1
4 1 0 0
5 1 0 1
6 1 1 0
7 1 1 1

linux logo 

So with this theory, you can see that full access for all three levels of user is represented as 777 (as all the 1’s are on).

Owner  Group  Public

7          7          7

6          4          4

As you can see above, 644 represents read write access for Owner, read access for Group and read access for Public

Written by

IT support bod with an interest in web design.

Filed under: Computer Tips and Tricks, Technology Tips · Tags: , , , , , , , , , , , , ,

Leave a Reply

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>