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

  1. Log in to your cPanel account.
  2. Go to FilesFile Manager.
  3. Navigate to the file or folder whose permissions you want to change.
  4. Select the file or folder by clicking its checkbox.
  5. Right-click and choose Change Permissions, or click Permissions from the toolbar.
  6. A dialog box will appear with two options:
    • Numeric permissions: Enter the three-digit value (e.g., 644 or 755).
    • Checkboxes: Check or uncheck Read, Write, and Execute for Owner, Group, and World.
  7. Click Change Permissions to apply.

Changing Permissions for All Files in a Directory

  1. In File Manager, select all files in a directory by clicking the top checkbox in the file list.
  2. Right-click and choose Change Permissions.
  3. Enter the desired permission value (e.g., 644 for files, 755 for directories).
  4. Check the box labeled Recursively to apply the change to all files and subdirectories within the selection.
  5. Click Change Permissions.

Common Scenarios

  • WordPress "Unable to write to wp-config.php": Set wp-config.php to 644.
  • WordPress cannot upload media: Set the wp-content/uploads/ directory to 755.
  • "500 Internal Server Error": Often caused by .htaccess set to 777 or 666. Reset to 644.
  • "403 Forbidden" error: Directories set to 644 instead of 755. Directories need execute permission to be browsable.

Important Notes

  • If you are unsure about the correct permissions, use 644 for files and 755 for 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 .htaccess is set to 644 (not 777 or 666).
  • 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 root or nobody and cannot be changed via File Manager. Contact your hosting provider for assistance.
Was this answer helpful? 0 Users Found This Useful (0 Votes)