Magento File Permission

Magento File Permission

  • cd
  • sudo. -type f -exec chmod 644 {} ; // 644 permission for files
  • sudo . -type d -exec chmod 755 {} ; // 755 permission for directory
  • sudo ./var -type d -exec chmod 770 {} ; // 770 permission for var folder
  • sudo ./pub/media -type d -exec chmod 770 {} ;
  • sudo ./pub/static -type d -exec chmod 770 {} ;
  • chmod 770 ./app/etc
  • chmod 644 ./app/etc/*.xml
  • chown -R :www-data .
  • chmod u+x bin/magento