Knowledgebase

Setting File and Folder Permissions in cPanel Print

  • cpanel, permissions, wordpress, errors, uploads, php, filemanager, security, password
  • 0

Permissions decide who can read, write and execute a file. Wrong values cause both 403 errors and security holes.

THE STANDARD VALUES

Folders: 755

Files: 644

Configuration files holding passwords (wp-config.php, .env): 600

CGI or shell scripts: 755

Never use 777. It allows anyone on the server to write to the file, and our server configuration will often refuse to execute such files anyway.

CHANGING PERMISSIONS

  1. In File Manager, select the file or folder.
  2. Click Permissions in the toolbar.
  3. Tick the boxes or type the numeric value.
  4. To apply to everything inside a folder, tick "Recurse into subdirectories" and choose whether it applies to files only or directories only. Run it twice: once for directories at 755, once for files at 644.
  5. Click Change Permissions.

COMMON SYMPTOMS

403 Forbidden on a folder: usually permissions below 755, or a missing index file with indexing disabled.

Uploads failing in WordPress: check wp-content/uploads is 755.

"Internal Server Error" after uploading a script: a file set to 777 or a folder set to 775 with group write.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot