File permissions determine who can read, write, or execute files and directories on your hosting account. Incorrect permissions are one of the most common causes of website errors. This guide explains how to view and change file permissions in cPanel File Manager.
Understanding File Permissions
Permissions are set using a three-digit number (e.g., 644 or 755). Each digit represents a level of access:
- First digit: Owner (the cPanel account user)
- Second digit: Group (other accounts on the server)
- Third digit: World (everyone, including website visitors)
Each digit is a sum of these values:
- 4 = Read (r)
- 2 = Write (w)
- 1 = Execute (x)
Common Permission Values
- 644 (Files) — Owner can read and write; group and world can only read. Recommended for most files.
- 755 (Directories) — Owner can read, write, and execute; group and world can read and execute. Recommended for folders.
- 600 — Only the owner can read and write. Used for sensitive files like
.htpasswd. - 400 — Only the owner can read. Used for highly sensitive configuration files.
Warning: Never set file permissions to 777 (full read, write, and execute for everyone). This is a serious security risk that can allow attackers to modify or execute malicious code on your website.
Changing File Permissions via File Manager
- Log in to your cPanel account.
- Go to Files → File Manager.
- Navigate to the file or folder whose permissions you want to change.
- Select the file or folder by clicking its checkbox.
- Right-click and choose Change Permissions, or click Permissions from the toolbar.
- A dialog box will appear with two options:
- Numeric permissions: Enter the three-digit value (e.g.,
644or755). - Checkboxes: Check or uncheck Read, Write, and Execute for Owner, Group, and World.
- Numeric permissions: Enter the three-digit value (e.g.,
- Click Change Permissions to apply.
Changing Permissions for All Files in a Directory
- In File Manager, select all files in a directory by clicking the top checkbox in the file list.
- Right-click and choose Change Permissions.
- Enter the desired permission value (e.g.,
644for files,755for directories). - Check the box labeled Recursively to apply the change to all files and subdirectories within the selection.
- Click Change Permissions.
Common Scenarios
- WordPress "Unable to write to wp-config.php": Set
wp-config.phpto644. - WordPress cannot upload media: Set the
wp-content/uploads/directory to755. - "500 Internal Server Error": Often caused by
.htaccessset to777or666. Reset to644. - "403 Forbidden" error: Directories set to
644instead of755. Directories need execute permission to be browsable.
Important Notes
- If you are unsure about the correct permissions, use
644for files and755for directories — these are the standard and safe defaults. - Permissions set via File Manager may be overridden by your server configuration. If changes do not take effect, contact your hosting provider.
- Some CMS platforms (like WordPress) have their own permission requirements. Always check the official documentation.
Troubleshooting
"Permission denied" error when saving a file:
- The file permissions may not include write access for the owner. Set to at least
644. - The directory containing the file may need write permission. Check the parent directory is set to
755.
Website shows 500 error after changing permissions:
- Check that
.htaccessis set to644(not777or666). - Check that all PHP files are set to
644. - Check that all directories are set to
755.
Cannot change permissions in File Manager:
- Some files are owned by
rootornobodyand cannot be changed via File Manager. Contact your hosting provider for assistance.