Magento 2.1 Permissions – Fix Admin Logo Showing 403 Forbidden Error

magento-2.1permissions

I have installed magento2.1 and all works fine except admin logo, it is showing as broken and in console it is showing 403 error .

Forbidden
You don't have permission to access /pub/static/adminhtml/Magento/backend/en_US/images/magento-logo.svg on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

I tried below commands :

php bin/magento setup:static-content:deploy
php bin/magento cache:clean
php bin/magento cache:flush

But logo not showing on admin login page. while pub directory and files have 0777 permission.

From error it is showing permission issue. Is it?

If so, How to change permission for specific user?

EDIT

When I am trying below command then only once the logo shows on server but after that again display 403 error.

rm -rf  pub/static/adminhtml/Magento/backend/en_US/images/magento-logo.svg

Best Answer

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

I hope this will help you.

Related Topic