How to Change File Permissions in cPanel File Manager

File permissions control who can read, write to, or execute a file on the server. Incorrect permissions are a common cause of 403 Forbidden errors and security vulnerabilities.


  • * *


How to change permissions


  1. Log in at https://tpc-hosting.com/login and open cPanel.
  2. Under Files , click File Manager.
  3. Navigate to the file or folder you want to change.
  4. Right-click the item and select Change Permissions , or select it and click Permissions in the toolbar.
  5. Tick or untick the checkboxes, or type the numeric value directly.
  6. Click Change Permissions.




  • * *


Recommended permissions


  • 644 — regular files (PHP scripts, HTML, CSS, JS, images). Owner can read and write; everyone else can only read.
  • 755 — directories and executable scripts. Owner can read, write, execute; everyone else can read and execute.
  • 600 — sensitive files (wp-config.php, .env). Only the owner can read and write; no one else has access.
  • 444 — read-only files that should never be modified by the web server.




  • * *


What to avoid


  • 777 — gives full read, write, and execute access to everyone. This is a serious security risk and should never be used in production.
  • 666 — makes files world-writable. Avoid unless absolutely necessary for a short time.




  • * *


Fixing 403 Forbidden errors


A 403 error usually means a directory does not have execute permission, or a file does not have read permission for the web server. Set directories to 755 and files to 644 as a starting point.


To change permissions recursively on a directory and all its contents, right-click the directory in File Manager and look for the Recurse into subdirectories option when changing permissions.

Updated on: 28/04/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!