How to change permissions of a file


How to change permissions (chmod) of a file

Permissions are probably the most important part if hosting a website on a server. Permissions determine if files and folders are writable and how they can be edited. For security reasons it is very important to have these set correctly. There are many ways change your file permissions which will be outlined below.

1. cPanel - File Manager


The most easiest and user friendly was is via the GUI interface called "File Manager" in cPanel. To do this in cPanel follow the these steps:

  • Login to your cPanel
  • Click on "File Manager"
  • Click the file or folder which you would like to change the permission on.
  • At the top right of the page please click on Change Permissions link.
  • Here you can select any permissions you would like to set for the file/folders.
  • Then Click Change Permissions

2. Using an FTP Client

Connect to FTP account of the relevant cPanel account. Locate the file you wish to change the permissions on and right click on it, this should bring up a menu which will allow you to choose Permissions or Attributes or Properties (Most FTP programs will have this - A common one is FileZilla Client).

Further Details:

One of the most common permission setting is the use of 777.

Servers Australia will not allow 777 permissions on files all servers we manage including all shared hosting servers. In saying this most scripts today still require you to change your file permissions to 777 for them to work initially. Servers Australia can confidently tell you that 755 will work in lieu of 777. In today's hosting world the use of 777 on PHP files or folders is not needed.

Have more questions? Submit a request