BuycPanel Blog

Latest news and updates

Managing File Permissions Using cPanel’s File Manager Tool

Posted by Alex on 20 03 2017.

Permissions are important in website hosting. In your account, a file or a directory/folder has permissions that control who will be able to read, write, and execute it. When you create a file, its permissions are set to default. Typically, users don’t have to change permissions but there are instances when changes like updates and installation will require them to do some permission changes.

How do file permissions look like?

You can view and change file permissions using the cPanel File Manager. On the File Manager panel, you will see the permissions on the rightmost side. Permissions follow a three-digit format and each digit can range from 0 to 7, which we will talk about later.

Reminder

A very important thing you should remember is that some file and folder types have to be set with specific permissions.

What if the permissions were set wrong?

Erroneous file permissions can cause errors and even enable unauthorized users to hack into your website. If the latter happens, the files can be altered to make the site more exposed.

For example, a file that has a 777 permission can be read, written, and executed by the ‘world’. This is a rare case because, most of the time, websites have no good reason to give the world the ability to write and execute website files.

If you see files with mismatched permissions (not default), it’s best to change them back to the recommended permissions.

How to change the settings of a file permission?

Using the File Manager, you can do the following:

Look for the file with the permissions you want to change.

Right-click on it and select Change Permissions.

Once you’re taken to the Change Permissions Window, adjust the settings according to your preference by checking the boxes. The rows indicate the actions you allow and the columns are the levels of access.

Rows: Read, Write, Execute

Read means the user can view the file.

Write means the user can edit the file.

Execute means the user can run the file.

Columns: Owner, Group, World

The owner is you, the one who can access the cPanel or shell.

The group is the other people on your server.

The world is any public visitor in the World Wide Web.

Once you’re done, click the Change Permissions button.

Reminder

You should only change file permissions if you really need to. Make sure that you won’t be allowing more access to your file when you actually want more restrictions.

What do the digits of the permissions mean?

The permission digits range from 0 to 7, with each digit representing the actions you allow each user to have.

0 – The user cannot read, write, or execute the file

1 – The user can only execute the file

2 – The user can only write the file

3 – The user can only write AND execute the file

4 – The user can only read the file

5 – The user can only read AND execute the file

6 – The user can only read AND write the file

7 – The user can read, write, AND execute the file

Meanwhile, the arrangement of the three-digits corresponds to owner-group-world users.