Magento2 Folder and Files Permissions

June 21, 2017 | In: How to Fix, Magento, web development

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