Short answer: Reset directory permissions to 755 and file permissions to 644, ensure an index.php file resides in public_html, and remove accidental Deny IP rules from .htaccess.
Fix access denied errors caused by missing directory index files, file permission restrictions, .htaccess Deny rules, or Imunify360 WAF blocks.
Before you start: Back up your site files and database and download the backup to your own computer. How to take a full backup
Quick reference
| Common Causes | 1. Missing index.php / index.html | 2. Folder permissions wrong (e.g. 700) | 3. Imunify360 WAF rule triggered |
|---|---|
| Required Permissions | Folders: 755 | Files: 644 |
| Security WAF | Imunify360 Proactive Defense |
Quick diagnosis
| Scenario & Suspected Cause | Immediate Action & Remedy |
|---|---|
| Incorrect file or directory permissions | Reset directories to 755 and files to 644 inside cPanel File Manager. |
| Missing directory index document | Ensure an index.php or index.html file exists inside the public_html root. |
| Request blocked by ModSecurity WAF rules | Inspect Imunify360 incident logs in cPanel and contact support to whitelist false-positives. |
| Deny directive in .htaccess file | Inspect .htaccess rules and remove accidental IP blocking or rewrite restrictions. |
Steps
- Verify Index File: Ensure your directory contains an
index.phporindex.htmlfile. If directory indexing is disabled and no index file exists, the server returns 403 Forbidden. - Verify File & Folder Permissions: Ensure folders are
0755and files are0644. If a folder is set to0700, web visitors are blocked. - Check .htaccess for Deny Directives: Inspect
.htaccessfor lines such asDeny from allor IP bans that may inadvertently block legitimate requests. - Check Imunify360 Blocks: If a specific POST request or theme setting triggers 403, Imunify360 WAF may have flagged the request as suspicious. Solve the on-screen CAPTCHA or contact support to whitelist the rule.
Troubleshooting and tips
- 403 on wp-admin: Security plugins often restrict
/wp-adminto specific IP addresses. Check security plugin settings or rename the plugin folder temporarily in File Manager.
Need more help? If you run into an error while following these steps, open a ticket with technical support and our team will look into it. Open a ticket