Magento2 directory permission
Posted on August 20th 2017Updated on June 6th 2023
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