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
- Log into cPanel File Manager
- Right-click the file or folder
- Select Change Permissions
- Either:
- Check/uncheck boxes for Read, Write, Execute
- Or enter numeric code (e.g., 644)
- 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
