Magento2 directory permission


Here is the quick developer permission for your magento root directory. Just go to your magento root directory and apply following commond using your terminal.

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 0777 var -Rf

chmod 0777 pub/media/ -Rf

chmod 0777 pub/static/ -Rf

chmod 644 app/etc/*.xml

chown -R :vallabh .

chmod u+x bin/magento

Tags: magento2, permission, linux