How to Set File and Folder Permissions in cPanel?


File and folder permissions control who can read, write, and execute files on your server. Incorrect permissions can cause website errors or security vulnerabilities. This guide explains how to set correct permissions in cPanel.

Understanding Permission Numbers (chmod)

  • 755 – Owner: read/write/execute | Group & Others: read/execute. Standard for folders.
  • 644 – Owner: read/write | Group & Others: read-only. Standard for files.
  • 777 – Full access for everyone. Avoid – major security risk.
  • 400 – Owner read-only. For sensitive config files.

How to Change Permissions in File Manager

  1. Login to cPanel → File Manager.
  2. Navigate to the file or folder.
  3. Right-click and select Change Permissions.
  4. Check or uncheck permission boxes, or type the numeric value directly.
  5. Click Change Permissions.

Recommended Permissions for WordPress

  • All folders: 755
  • All files: 644
  • wp-config.php: 440 or 400
  • .htaccess: 644

Set Permissions via SSH

# Set all files to 644
find ~/public_html -type f -exec chmod 644 {} \;

# Set all folders to 755
find ~/public_html -type d -exec chmod 755 {} \;

Never set permissions to 777 on a live website. It allows anyone to modify your files and is a critical security risk.

If you continue to face issues, please open a create a request.

Помог ли вам данный ответ? 0 Пользователи нашли это полезным (0 голосов)