How to change the permission for Files in cPanel Print

  • 2

All files on UNIX (including Linux and other UNIX variants) machines have access permissions. In this way the operating system knows how to deal with requests to access the files.

There are three types of access:

  • Read − It is denoted by ‘r’ and number 4, it gives ability to the user for reading the file only.
  • Write − It is denoted by ‘w’ and number 2, it gives ability to the user for writing into the file only.
  • Execute − It is denoted by ‘x’ and number 1, it gives ability to user for executing the file only.

The web server needs to be able to read your web pages in order to be able to display them in a browser.

The following permissions need to be set in order for your web site to function properly.

  • All HTML files and images need to be readable by others. The value for this is 644 (readable by User, Group and World, and writable by User). It is set automatically when you upload files.
  • All folders need to be executable by others. The value for this is 755 (readable by User, Group and World, writable by User, executable by User, Group and World). It is set automatically when you create a folder.
  • All CGI files (all files in the cgi bin folder)need to be executable by other. The value for this is 755 (readable by User, Group, and World, writable by User, executable by User, Group, and World).

It is not set automatically when you upload files. You need to change file permissions manually. Access permissions can be given in groups too, for example, if we want to give a file to read and write permission only, we can assign ‘rw–‘ to that file or in numerical form, we can assign number 6 –as 4 for read and 2 for write equals to 6.

These access permissions are given to three types of users −

  • User − It is owner of the file.
  • Group − It is the group of users in which Owner lies.
  • World − It is referred to everyone else.

We give access permissions according to file types in cPanel. By default, cPanel File Manager gives 6-4-4 permissions to the users –6 to the User, 4 to the Group and 4 to the World. Most of the time we do not need to change the file permissions unless needed.

You can change the file permissions in cPanel by using the following steps −

Step 1 − Go to File Manager from cPanel Home.

Step 2 − Navigate to the File or Folder you wish to change permissions to and select the file or folder by a single click of the mouse.

Step 3 − Click on Permissions link from the Top menu of File Manager and you will get a Prompt as shown below.

Step 4 − Choose permissions according to your need and Click on Change Permissions to save the new access permissions of the file.
Once you assign the permissions as per your required then click on change permission.

Done!


Was this answer helpful?

« Back