cancel
Showing results for 
Search instead for 
Did you mean: 

403 forbidden error?

403 forbidden error?

I just installed Magento and getting this error. I chown the directory with www-data. I’m using nginx, I am stumped why I’m getting this error.

2 REPLIES 2

Re: 403 forbidden error?

Hi @tmccaff57g5da8 

You already chowned to www-data, but make sure:


sudo chown -R www-data:www-data /path/to/magento
find /path/to/magento -type d -exec chmod 755 {} \;
find /path/to/magento -type f -exec chmod 644 {} \;

Directories
must be at least 755

 
  • Files should be 644

  • No 777 — Magento’s security will hate you for it.

    I hope it will help you.
    Problem solved? Click
     Accept as Solution!

Re: 403 forbidden error?

Hi @tmccaff57g5da8,

A fresh Magento 2 install with Nginx giving a 403 Forbidden usually means Nginx or PHP-FPM can’t serve files due to permissions, ownership, or configuration.

1) File permissions & ownership as per the adobe standard

2) System requirements should meet according to version - https://experienceleague.adobe.com/en/docs/commerce-operations/installation-guide/system-requirement...

3) Check Nginx/Apache root path should point to /var/www/html/magento/pub

Problem Solved? Accept as Solution!

Thanks & Regards

Ankit Jasani