Resetting File Permissions

Last modified by clicclac on Fri, April 22, 2011 00:52
Source|Old Revisions  |  Back To Group

This is an old revision of the document!


Here’s how to reset your file and directory permissions if PHP is running through FastCGI, suPHP, or LSAPI:

  1. find . -type f -exec chmod 644 {} ;
  2. find . -type d -exec chmod 755 {} ;
  3. chmod 550 pear
  4. chmod 550 mage #for magento 1.5+

If PHP is running as a module (DSO), you will need to do this:

  1. find . -type f -exec chmod 644 {} ;
  2. find . -type d -exec chmod 755 {} ;
  3. chmod o+w var var/.htaccess includes includes/config.php app/etc
  4. chmod 550 pear
  5. chmod 550 mage #for magento 1.5+
  6. chmod -R o+w media

The above commands need to be executed from the root directory where Magento is installed.

If you do not have access to SSH:

  1. Unzip magento-cleanup.php to the root directory where Magento is installed.

!!! In Magento Version 1.5. you need to change magento-cleanup.php:

  Edit: 
  chmod("pear", 550);
  into:
  chmod("lib/pear", 550);      ,



 

Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs