How to Fix File and Folder Permissions in cPanel
Incorrect file permissions are one of the most common causes of 500 Internal Server Errors, blank white screens, and security vulnerabilities on Shared and Business Hosting. This guide explains what permissions are, what the correct values should be, and how to fix them quickly through cPanel or SSH.
What Are File Permissions?
Every file and folder on your server has a permission code that controls who can read it, write to it, or execute it. Permissions are represented as a 3-digit number (e.g. 755 or 644). Each digit controls access for the Owner, Group, and Others (Public) respectively.
4= Read2= Write1= Execute
So 7 = 4+2+1 = Read + Write + Execute, 5 = 4+1 = Read + Execute, 6 = 4+2 = Read + Write.
The Correct Permissions for WordPress
- Folders / Directories:
755โ Owner can read, write, execute. Everyone else can read and execute (traverse) but not write. - Files:
644โ Owner can read and write. Everyone else can only read. - wp-config.php:
400or440โ Owner read only. This file contains your database password and should be locked down tightly.
Never set permissions to 777 (read, write, execute for everyone). This is a critical security vulnerability and will cause cPanel servers to reject the files with a 500 error for that exact reason.
How to Fix Permissions in cPanel File Manager
- Log in to cPanel and click File Manager in the Files section.
- Navigate to your
public_htmlfolder. - To fix a single file or folder: right-click it and choose Change Permissions. Check the correct boxes or type the octal value (e.g.
755). - To fix an entire WordPress install at once: select the
public_htmlfolder, right-click, choose Change Permissions, check Recursive, set to755, and click Change Permissions. Then go back and manually set all files to644.
How to Fix Permissions via SSH (Faster)
If you have SSH access (available on the Executive Shared plan and all Business Hosting plans), this is the fastest method. Connect via SSH and run:
# Fix all folders to 755
find /home/yourusername/public_html -type d -exec chmod 755 {} \;
# Fix all files to 644
find /home/yourusername/public_html -type f -exec chmod 644 {} \;
# Lock down wp-config.php
chmod 400 /home/yourusername/public_html/wp-config.php
Replace yourusername with your actual cPanel username.
Still Getting a 500 Error?
If fixing permissions didn't resolve the error, check your .htaccess file for syntax errors or review the full 500 error troubleshooting guide.
Need SSH Access?
SSH command-line access is included on the Executive Shared Hosting plan and all Business Hosting tiers. No extra charge โ it is built in.