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 .

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?


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

2 Answers 2


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.

  • I tried, but still showing same error for admin logo. Can you please briefly explain about u+w {} \; and u+x in these command? Jul 12, 2017 at 5:31
  • When I run these commands as a root then these are not returning any error but when I'm trying these as username(assigned to magento) then it is returning not permitted error. please advice? Jul 12, 2017 at 5:42
  • check my updated answer and run upgrade and deploy commands. Jul 12, 2017 at 5:45

777 should never be used.

For a Magento installation, after it has been installed, the entire document root should be unwritable by the web server user (with some exceptions). They should be owned by a user other than the web server user. The only directories that should be writable should be the media/ and var/ directories and their write permissions should be denoted by file ownership, not chmod permissions. Opening file permissions beyond this opens your web server to an increased number of attack vectors.

So, chmod 755 for directories, 644 for files, owned by a non-webserver, non-root user with next to no system permissions, exception for media/ and var/ which should have the same permissions, but owned by the web user.

You should only use 755 for directories and 644 for files (they don't need the executable permission).

Execute the following server commands going into your project folder:

find . -type f -exec chmod 644 {} ;
find . -type d -exec chmod 755 {} ;

The first line finds all files and chmods them to 644, the second line finds all directories and chmods them to 755.

Hope this should resolve your problem.

Your Answer

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

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