How to Use cPanel File Manager and Fix Invalid File Permissions (644 / 755)

54 views
Short answer: Select the target folder or file in File Manager, click 'Change Permissions', and assign 755 to directories and 644 to files to ensure security without breaking web server access.

Navigate cPanel File Manager, upload and edit site assets, and correct permission mismatches that cause HTTP 403 Forbidden or 500 Internal Server errors.

Before you start: Back up your site files and database and download the backup to your own computer. How to take a full backup

Quick reference

Standard File Permissions 644 (Read/Write for Owner, Read for Group & World)
Standard Folder Permissions 755 (Read/Write/Execute for Owner, Read/Execute for Others)
Forbidden Permissions 777 (Blocked by CloudLinux CageFS & LiteSpeed suEXEC for security)

Steps

  1. Open File Manager: In cPanel, click File Manager under Files.
  2. Navigate to Website Root: Primary domain files are located in public_html.
  3. Inspect Permissions: Check the rightmost column labeled Permissions:
    • Every folder should read 0755.
    • Every file (including index.php and .htaccess) should read 0644.
    • The configuration file wp-config.php should ideally be set to 0600 or 0640 for enhanced security.
  4. Change Permissions: Right-click any file or folder > click Change Permissions > set to 644 for files or 755 for directories > click Change Permissions.

Terminal / SSH Command to Reset Permissions Instantly

# Set every folder to 755 and every file to 644
find public_html/ -type d -exec chmod 755 {} \;
find public_html/ -type f -exec chmod 644 {} \;

Troubleshooting and tips

  • Never use 777 Permissions: Under LiteSpeed Web Server and CloudLinux suEXEC, any script or directory with 777 permissions will immediately return an HTTP 500 Internal Server Error to prevent unauthorized execution.
Need more help? If you run into an error while following these steps, open a ticket with technical support and our team will look into it. Open a ticket
Was this article helpful?
No, I need more help
Didn't find your answer?
Under 3 minutes
Submit Support Ticket