403 Error (Forbidden)

If you see a 403 Forbidden error, there can be a few reasons that causes it:-


1. Wrong File Permissions

The file permission for all files in our server should be set to 644 and all directories to 755. 

You may see a 403 Error you have insecure file permissions like 666 and 777. 

Magento Built-In Backup System is known to reset file permissions to 666 and 777. 

If you have SSH Access, you can resolve this easily.

SSH into your account and switch to the public_html directory (VERY IMPORTANT):-
cd /public_html

Then input the following command:-
find . -type d -print0 | xargs -0 chmod 0755 && find . -type f -print0 | xargs -0 chmod 0644

If you do not have SSH Access or you are afraid of setting things wrongly, you can run our script at GitHub in your web browser. 


2. ModSecurity

Your script or application may have triggered ModSecurity, our Web Application Firewall which is an extra layer of protection for your website against hackers and exploits. 

You can temporarily disable ModSecurity in your cPanel --> ModSecurity to determine if this is the cause of the error. 


3. Rules in .htaccess File

You may have some rules in your .htaccess file which blocks access to some files, directories or the whole website. 


  • Email, SSL
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I set the correct file permissions for Magento?

Magento installation out of the box does not use the correct and safe file permissions for our...

Magento Cron Job

With Magento version 1.8.x and 1.9.x, some users are facing issues where the Magento Cron Job is...

500 Error (Internal Server Error)

If you see a 500 Internal Server Error error, your Disk Space usage is most likely full. You...

503 Error (Service Temporarily Unavailable)

If you see a 503 Service Temporarily Unavailable error, go to the directory you install...

Image Upload Issue with Magento 1.9.2.3 or SUPEE-7405

Magento Community Edition 1.9.2.3 and the Security Patch SUPEE-7405 introduced a new bug with...