Files and folders inside your Hosting account will have permissions that control the read, write and execute operations in Linux.
- Read: Read access allows the file to be viewed by the user.
The read permission is indicated with 'r' or the number 4. - Write: Write access allows for files to be modified by the user.
The write permission is indicated with 'w' or the number 2. - Execute: Execute access allows the user to run programs.
The execute permission is indicated with 'x' or the number 1.
Read, Write and Execute permissions can be set for the following three user groups –
- User: owner of the file.
- Group: Other users of the same group belong to users of the same group where this file is located.
- World: Access for everyone who is not in the group.
Full permission for a file is a combination of permissions and access types. For example, in cPanel, you will find the file permission with the 644 number.
For the user, the read permission value of 4 and write the value of 2 equals 6. Also, the same file has read permissions with group and world. Hence, the total value of that file is 644. As everyone (other users) needs to run the directory, we must provide 755 permissions.
Following are the steps to change the file permission on cPanel –
- Log in to your cPanel account.
- Go to the File Manager.
3. Select the required file or directory for which you are looking to change the permission.
4. Provide appropriate permissions to your files/ directory per the conventions discussed above and click on Change Permissions.
5. You can view the given file permissions as per the images shown below –
Thus, following these steps will help you change the file permission in cPanel.