How to reset file permissions on Magento base directory

These commands will reset the file permissions on the base Magento installation to the correct permissions:

 

  1. find . -type f -exec chmod 644 {} \;
  2. find . -type d -exec chmod 755 {} \;
  3. chmod o+w var var/.htaccess app/etc
  4. chmod 550 pear
  5. chmod -R o+w media