BuycPanel Blog

BuycPanel Blog

Latest news and updates

12/09/2014 – Changing File Permissions

Posted by Jamison on 09 12 2014.

What are permissions? There are the conditions dictating file access that allow server computers to write and edit your files, it’s also the permissions that protect some files being from being written and edited by unauthorized parties.


With cPanel you can change your file permissions in several ways. One of the easy and basic ways to change the permissions is through File Manager.


How to change the permissions for a file or folder in cPanel:


  1. Login to your cPanel.
  2. Click on File Manager.
  3. Click the name of the file for which you would like to change permissions.
  4. Select the Change Permissions link at the top right of the page.
  5. Select the permissions you would like to set for the file.
  6. Click Change Permissions.


Using File Transfer Protocol


Connect to FTP and go to the file. Right click on the file and choose Permissions or Attributes or Properties.


Using SSH or a script


This can be done with the chmod command.


The script system is represented by a grid of three columns and three rows. The columns are the three types of users. First is the owner (you), the person who has access to the cPanel or shell. Second is the Group (the other people on your server). Third is the World (any visitor from the public).


Each row represents a permitted action for a file. Read means the user has permission to view the file. Write means the user has permission to the file. Execute means the user has permission to run the file.


The Group and the World should be able to view your website files. For any file you don’t what them to see you can remove the check mark in the intersecting box. If you remove the check mark for Read under Group and World, then the file will not show in anyone’s browser and they will see a 403 Forbidden error.


In File Manager, permissions are represented as numbers. A string should only have three numbers, if you see four digits, gnore the first one. So 0755 is the same as 755.


The numbers represent a combination of each unique permission. The first of the three numbers always represents the permissions for the owner, the second digit represents the group and third, the world.


  • Read is equal to 4
  • Write is equal to 2
  • Execute is equal to 1
  • No permissions for a user is equal to 0


Adding up the numbers/permissions, you get:


  • Write and Execute without Read is equal to 3
  • Read and Execute without Write is equal to 5
  • Read and Write without Execute is equal to 6
  • Read and Write and Execute is equal to 7


Your files should always have permissions of 644 or 755. It actually won’t matter if you give the executable permission or not as you won’t see any difference.


Folders must always be 755 and any files inside the cgi-bin folder must have 755 permissions.


777 permissions


You can also have files with 777 permissions. However, some hosting servers don’t normally allow this for security reasons. You might have also heard somewhere that some scripts will require you to have 777 permissions, but this is really not necessary. A 755 should do the trick.