Magento2 Folder and Files Permissions

We all are developers and generally we do mistake in files and folders permission. It might be intentionally to fix any issue or by mistake. But how to fix the permissions back when it happened.

Just go to your Magento setup root folder and run these all commands:

find . -type f -exec chmod 644 {} \;

find . -type d -exec chmod 755 {} \;

find ./var -type d -exec chmod 777 {} \;

find ./pub/media -type d -exec chmod 777 {} \;

find ./pub/static -type d -exec chmod 777 {} \;

chmod 777 ./app/etc

chmod 644 ./app/etc/*.xml

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

*