How to Set File and Folder Permissions in cPanel

File permissions control who can read, write, and execute files on your hosting account. Setting correct permissions is important for both security and functionality - incorrect permissions can cause scripts to fail or expose sensitive files. cPanel's File Manager makes it easy to view and change permissions without needing command-line access.

Understanding Permission Values

Permissions are represented as a three-digit number. Each digit controls access for the owner, the group, and others (everyone else), respectively. Each digit is the sum of:

  • 4 = Read
  • 2 = Write
  • 1 = Execute

The recommended permissions for most websites are:

  • 644 for files - owner can read and write; group and others can only read.
  • 755 for directories - owner can read, write, and execute; group and others can read and execute.

How to Change Permissions in File Manager

  1. Log in to cPanel and open File Manager.
  2. Navigate to the file or folder whose permissions you want to change.
  3. Right-click on the file or folder and select Change Permissions, or select it and click Permissions in the toolbar.
  4. A dialog box will appear showing checkboxes for Read, Write, and Execute permissions for Owner, Group, and World.
  5. Check or uncheck the appropriate boxes, or type the numeric value directly in the permission field.
  6. Click Change Permissions to save.

Applying Permissions Recursively

When changing permissions on a folder, you can check the option to Recurse into subdirectories to apply the changes to all files and subfolders within. Use this with care - applying execute permissions to all files indiscriminately can create security risks.

Common Scenarios

  • If a PHP script returns a 500 error, check that the file permission is not 777 and that the directory is 755.
  • If uploads to a folder are failing, ensure the folder has write permission for the owner (e.g., 755 or 775).

If you need help troubleshooting file permission issues, contact our support team and we will sort it out for you.

100% Satisfaction Guarantee

We're so confident you'll love dotCanada that we offer a 30-day money-back guarantee. Not satisfied? Get a full refund, no questions asked.

Ready to Get Started?

Join thousands of Canadian website owners who trust dotCanada for reliable, fast web hosting.

Get Started Today