Reseller Login or Sign up FAQ Search
ResellersPanel's Blog

File permissions in Unix-based systems

In this blog we have reviewed a lot of subjects so far, but today I want to go back to the basics of web hosting, and speak of something, which ranks very high in the “things you need to know about web hosting” list. And since we have already covered the subject of emails, today we will go into details on the file permissions topic.

File permissions in Unix-based operating systems

Just like in Windows, in Unix-based systems each file has it’s own permissions. They are used to specify the actions a given user can perform with this file. In the Windows operating system, the file permissions are text based, thanks to the graphical interface of the operating system. In the Unix-based systems, such as Linux, which are very common in the web hosting world, file permissions are denoted with numbers or with letters.

Read – read is denoted by “r”. Files with read permissions can be read by the user.
Write – write is denoted by “w”. Files with write permissions can be modified by the user.
Execute – execute is denoted by “x”. Files with execute permission can be executed as programs or scripts by the user.

Users in Unix-based systems are divided also into three groups, to better distinguish their access level :

User – users are the owners of a certain file. The main user on the server is the “root” user and below him are the individual accounts.
Group – files, in the same folder.
World – everybody else.

Displaying this the way file permissions are presented in Windows will complicate things. This is why, in Unix file permissions are displayed with numbers. You can see which are the permissions associated with each number in the table below.

Which number?
0
1–x
2-w-
3-wx
4r–
5r-x
6rw-
7rwx

Each group can have separate permissions, which is why in Unix file permissions are presented by a 3-digit number – 644 or 755. Each letter represents the authority a group has over a file. A file with 644 permissions can be both Read and Written by the User and just read by the Group and World

Originally published Tuesday, July 7th, 2009 at 3:09 pm, updated July 3, 2024 and is filed under cPanel Support.

Tags: , , , , , ,

One Response to “File permissions in Unix-based systems”

  1. ResellersPanel Blog » Blog Archive » cPanel Reseller Tutorials – File Permissions in cPanel Says:

    […] my last cPanel tutorials post, I went over the file permissions in Unix-based systems in general, which will save me the need to write the customary intro text for this post. So, […]

Leave a Reply


« Back to menu