Setting File Permissions

File permissions control who can read, write, or execute files on your server.

Understanding Permissions

Permissions use 3-digit codes:

  • 644 - Standard for files (owner can write, everyone can read)
  • 755 - Standard for folders (owner can write, everyone can read/execute)
  • 444 - Read-only
  • 777 - Full access (NOT recommended - security risk)

Changing Permissions

  1. Log into cPanel File Manager
  2. Right-click the file or folder
  3. Select Change Permissions
  4. Either:
    • Check/uncheck boxes for Read, Write, Execute
    • Or enter numeric code (e.g., 644)
  5. Click Change Permissions

Recommended Settings

  • PHP files: 644
  • HTML files: 644
  • Folders: 755
  • Images: 644
  • wp-config.php: 600 or 640 (WordPress)

Common Issues

  • 500 Error: Often caused by incorrect permissions, try 644 for files, 755 for folders
  • Cannot write to file: File permission too restrictive, change to 644
  • Security warning: Never use 777 unless absolutely necessary and temporarily
Was this answer helpful? 0 Users Found This Useful (0 Votes)

Powered by WHMCompleteSolution