0

I installed magento 2.1. When I changed the logo, the file is returning 403 forbidden error in console.

I have checked in this forum and found a solution here.

When I did this, the logo was visible for a brief moment then again it's back to showing 403 error.

Any insight on how to solve this would be very helpful.

Thank you!

URL: Click here

4
  • its permission issue please check my answer. Jul 17, 2017 at 6:22
  • Which is your current deploy mode? Jul 17, 2017 at 6:50
  • @SHPatel, deployed as developer mode.
    – syd
    Jul 17, 2017 at 7:18
  • See my below answer. Jul 17, 2017 at 7:19

3 Answers 3

0

Enter the following commands in the order shown:

cd <your Magento install dir>
find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} \;
find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} \;
chmod u+x bin/magento

After run permission command you need to run below commands

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
3
  • I did those. but few moments later, It back to showing 403 error. magento.stackexchange.com/questions/183218/… - this is the first URL, I provided in my message. It has the same solution.
    – syd
    Jul 17, 2017 at 6:26
  • Yes, you can do it again and check. Jul 17, 2017 at 6:27
  • doing it for last two days. same result every time. logo is shown. then after some time, it's 403 again!!
    – syd
    Jul 17, 2017 at 6:30
0

commands you need to run

php bin/magento deploy:mode:set developer
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
2
  • After running those commands, a fatal error message is shown stating that var/cache is not writable. To solve this, changed permission to 777. After that, the next reload shows the logo. Then again if the page is reloaded, the logo disappears and shows 403 error.
    – syd
    Jul 17, 2017 at 7:57
  • Apply properly permission to your magento setup. Jul 17, 2017 at 8:22
0

For my case, the case was the logo file's ownership.

The uploaded file had root as owner. Following instructions of this URL, I found out the user for my installation. Then Changed the file ownership using chown.

chown <user> logo.png

FYI, file permission is set to: 644.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.