Skip to content
Host4u Limited

File and folder permissions

Support Portal  »  Knowledgebase  »  Viewing Article
There was a problem loading the comments.
  Print

Every file and folder on your hosting has permissions that say who may read it, change it, or run it. They are shown as a three-digit number such as 644 or 755.

The three groups and three actions

Permissions are set separately for three groups:

  • User: you, the owner of the account.
  • Group: other users in the file's group.
  • World: everyone else, including visitors to your website.

For each group you can allow Read, Write and Execute (run a program, or open a folder). Each digit of the number adds up these values: read is 4, write is 2 and execute is 1. So 6 is read and write, 5 is read and execute, and 7 is all three.

What you get by default

New files and folders get cPanel's default permissions, normally 644 for files (you can read and write, everyone else can only read) and 755 for folders (you can read, write and open, everyone else can read and open). This is right for most websites.

When to change them

Change permissions only when the software you are installing asks you to, and follow that software's own instructions for which files need which permissions: they differ between WordPress, Joomla and other applications. Do not use 777 (everyone can change it) unless you have to: anyone, including attackers, could then change the file.

Changing permissions in File Manager

  1. In cPanel, open File Manager (see File Manager).
  2. Select the file or folder and click Change Permissions.
  3. Tick Read, Write and Execute for User, Group and World, or type the number in Mode.
  4. Click Change Permissions to save.

An FTP program can do the same: right-click the file and choose its permissions option.

Getting a "403 Forbidden" or a "500" error

Wrong permissions are a common cause. A folder needs Execute to be opened, and files should not be writable by everyone. Check the software's instructions, or reset them to the defaults above and test again. See also Website errors explained.


Share via
Did you find this article useful?  

Related Articles


Self-Hosted Help Desk Software by SupportPal