Knowledge Base http://www.magentocommerce.com/knowledge-base/ en kara@croasdill.com Copyright 2010 2014-04-18T18:48:08+00:00 Cache Storage Management http://www.magentocommerce.com/knowledge-base/entry/cache-storage-management http://www.magentocommerce.com/knowledge-base/entry/cache-storage-management table.noBorder td{ padding:10px 15px 10px 0px; border:0px; }

Using Magento’s cache management system is an easy way to improve the performance of your site. The Cache Storage Management page lists each primary cache, with its current status and associated tag. Any cache that needs to be refreshed is flagged in the list. A notice appears at the top of the workspace to guide you through the process.

In addition to the list of caches, there are separate buttons to flush the cache of Magento-specific files, and to flush cache storage of all files. At the bottom of the page are additional buttons to flush the catalog product images cache and the JavaScript/CSS cache.

After clearing a cache, always refresh your browser to make sure that you see the result in your store.

Cache Management
Cache Management

To refresh specific caches:

  1. Do one of the following:
    • Click the Cache Management link in the message above the workspace.
    • On the Admin menu, select System > Cache Management.

    The “Invalidated.” status of each cache that needs to be refreshed appears in yellow.

  2. Cache Refresh Needed
    Cache Refresh Needed
  3. Do one of the following:
    • For each cache that needs to be refreshed, click the checkbox at the beginning of the row.
    • To select a group, click one of the selection options above the list.
  4. Set Actions to “Refresh,” and click the Submit button.

Refreshing Multiple Caches
Refreshing Multiple Caches

To flush the product image cache:

  1. From the Cache Storage Management page, under Additional Cache Management, click the Flush Catalog Images Cache button.

    Look for the message, “Image cache was cleaned” above the workspace.

  2. To see the changes, make sure to clear your browser cache.

 

To flush the JavaScript/CSS cache:

  1. From the Cache Storage Management page, under Additional Cache Management, click the Flush JavaScript/CSS Cache button.

    Look for the message, “The JavaScript/CSS cache has been cleaned” above the workspace.

  2. To see the changes, make sure to clear your browser cache.

 

Button Descriptions

ButtonDescription
Flush Magento CacheRemoves all items in the default Magento cache (var/cache) and the var/full_page cache that have a Magento tag,
Flush Cache StorageRemoves all items in the cache. This is the equivalent of deleting the entire contents of the cache folder on the server.If your system uses an alternate cache location, any cached files used by other applications will be removed.
Flush Catalog Images CacheRemoves all automatically resized and watermarked catalog images that are stored at: media/catalog/product/cache. If recently uploaded images aren’t visible in the catalog, try flushing the catalog and refreshing your browser.
Flush JavaScript/CSS CacheRemoves the merged copy of JavaScript and CSS files from the cache. If recent changes to the stylesheet or JavaScript aren’t visible in the store, try flushing the JavaScript/CSS cache and refreshing your browser.

Cache Types

TypeDescription
ConfigurationSystem and module configuration files.
Associated tag: CONFIG
System:config.xml
local.xml
Module:config.xml
LayoutsPage layout building instructions.
Associated tag: LAYOUT_GENERAL_CACHE_TAG
BlocksHTML Output The HTML that is associated with page blocks.
Associated tag: BLOCK_HTML
TranslationsLanguage translation files.
Associated tag: TRANSLATE
Collections DataFiles that contain data that is the result of a query.
Associated tag: COLLECTION_DATA
EAV Types and AttributesAttribute entities, types, and values.
Associated tag: EAV
Web Services ConfigurationWeb Services definition files (api.xml)
Associated tag: CONFIG_API
Web Services ConfigurationWeb Services definition files (api2.xml)
Associated tag: CONFIG_API2
PageFull page cache.
Associated tag: FPC
]]>
Cache Storage Management 2014-03-16T22:23:35+00:00
Getting the PHP 5.4 patch for Magento Enterprise Edition (EE) and Community Edition (CE) http://www.magentocommerce.com/knowledge-base/entry/php54-patch http://www.magentocommerce.com/knowledge-base/entry/php54-patch

Magento has a patch that enables you to use PHP 5.4.x with Magento Enterprise Edition (EE) and Magento Community Edition (CE).

This patch applies to:

  • Magento CE versions 1.6.0.0–1.8.1.0
  • Magento EE versions 11.0.0.0–1.13.1.0 with PHP version 5.4.x.

To get the patch for Magento CE:

  1. Go to www.magentocommerce.com/download.
  2. Click My Account in the upper right corner of the page.
  3. Log in when prompted.
  4. Scroll to the Magento Community Edition Patches section.
  5. Follow the prompts on your screen to get the PHP 5.4 support patch.

To get the patch for Magento EE:

  1. Log in to www.magentocommerce.com.
  2. In the left pane, click Downloads.
  3. In the right pane, click Magento Enterprise Edition.
  4. Follow the prompts on your screen to download the PHP 5.4 Compatibility patch.
  5. Apply the patch as discussed in How to Apply and Revert Magento Patches.
]]>
Getting the PHP 5.4 patch for Magento Enterprise Edition (EE) and Community Edition (CE) 2014-02-24T15:00:33+00:00
Discover credit card validation issue: Magento EE 1.9.1.1 - 1.13.1.0 and CE 1.4.2.0 - 1.8.1.0 http://www.magentocommerce.com/knowledge-base/entry/discover-card-validation http://www.magentocommerce.com/knowledge-base/entry/discover-card-validation

Magento has fixed an issue that prevented some Discover credit cards from validating properly. The issue was that certain Discover credit card number ranges were not recognized as being valid. As a result of the fix, all Discover cards should validate properly.

This fix applies to:

  • Magento Enterprise Edition (EE) versions 1.9.1.1–1.13.1.0
  • Magento Community Edition (CE) versions 1.4.2.0–1.8.1.0

Important: This is not a security threat. No data has been compromised or misused. It affects only the ability to validate certain credit card number ranges as valid Discover card numbers.

To get the patch for Magento CE, submit a Magento CE help request.

To get the patch for Magento EE:

  1. Log in to www.magentocommerce.com.
  2. In the left pane, click Downloads.
  3. In the right pane, click Magento Enterprise Edition.
  4. Follow the prompts on your screen to download the SUPEE-2725 patch for your version of EE.
  5. Apply the patch as discussed in How to Apply and Revert Magento Patches.

Important: If you applied an earlier version of this patch, you must first revert the old patch.

]]>
Discover credit card validation issue: Magento EE 1.9.1.1 - 1.13.1.0 and CE 1.4.2.0 - 1.8.1.0 2014-03-27T18:41:38+00:00
Error Using Payflow with Magento Enterprise Edition (EE) 1.12.0.2 http://www.magentocommerce.com/knowledge-base/entry/10431-ee11202 http://www.magentocommerce.com/knowledge-base/entry/10431-ee11202

Problem

A customer applies a coupon code when checking out in a web store that runs EE 1.12.0.2 and is configured to use the Payflow Pro or Payflow Express payment methods. The following error displays:

PayPal gateway rejected the request. Field format error: 10431-Item amount is invalid

Solution

To resolve this issue, contact Magento Support and request the patch for support issue ID SUPEE-1474.

Then apply the patch as discussed in How to Apply and Revert Magento Patches.

]]>
Error Using Payflow with Magento Enterprise Edition (EE) 1.12.0.2 2013-12-16T13:04:02+00:00
Upgrade Roadmap for Magento Community Edition (CE) 1.8 http://www.magentocommerce.com/knowledge-base/entry/ce18-upgrade-roadmap http://www.magentocommerce.com/knowledge-base/entry/ce18-upgrade-roadmap

Magento recommends you upgrade your installation using the following guidelines in a development or test environment, separate from your existing production environment:

  1. Install Magento in a different directory:
    • Recommended. Set up a new system (that is, another host) on which to install Magento.
      The system should be identical to, if not better than, your current system. The new system must meet the Magento system requirements.
    • Install Magento in a new, empty root installation directory on the same server.
  2. In your current production environment:
    1. Back up your Magento database.
    2. Archive the file system.
      This includes the media directory and subdirectories; all extensions and customizations; and all custom themes.
  3. In the development or test environment:
    1. Create a new, empty database instance.
    2. Import the production database tables into the development database instance.
    3. Copy your production media directory, extensions, themes, and other customizations to the development system.
    4. Copy local.xml to magento-install-dir/app/etc and edit it if necessary to reference the production database instance.
    5. In a web browser, go to your development system base URL.
    6. Wait for upgrade scripts to run.
    7. Verify the development system is now identical to the production system.
      If not, fix issues, retest, and upgrade again.
  4. Test the development system thoroughly, including:
    • Verify all extensions, themes, and customizations work.
    • Place orders using all webstores and all payment methods.

When you're ready to start your upgrade, see Upgrading to and Verifying Magento Community Edition 1.8 and Enterprise Edition 1.13 - Part 2.

]]>
Upgrade Roadmap for Magento Community Edition (CE) 1.8 2013-11-24T16:59:50+00:00
How to Apply and Revert Magento Patches http://www.magentocommerce.com/knowledge-base/entry/apply-revert-magento-patches http://www.magentocommerce.com/knowledge-base/entry/apply-revert-magento-patches

Table of Contents

Overview

This article discusses how to apply and revert Magento patches provided to you by Magento Support. The article assumes you already have the patch; if not, contact Magento Support.

Note: This article assumes your patch file name ends in .sh. If your patch file name ends in .patch or something else, contact Magento Support before proceeding.

How to Get Magento Patches

Magento Support provides some patches for Magento CE and EE on magentocommerce.com. This section discusses how to get those patches.

If Magento Support provided a patch to you, skip this section and continue with How to Apply a Magento Patch.

See one of the following sections for specific information about Magento CE or EE:

Getting Magento CE Patches

To get patches for Magento CE:

  1. Log in to magentocommerce.com/download.
    (Click My Account in the upper right corner of the page.)
    If you don't have an account, you can register for one; the account is free.
  2. In the Magento Community Edition Patches section, locate the patch to install.
  3. From the list next to the patch, choose your CE version.
  4. Click Download.
  5. After the patch downloads, continue with How to Apply a Magento Patch.

Getting Magento EE Patches

To get patches for Magento EE:

  1. Log in to magentocommerce.com.
    (Click My Account in the upper right corner of the page.)
  2. Click Downloads in the left pane.
  3. Click Magento Enterprise Edition in the right pane.
    The following figure shows an example.
  4. Click Support Patches.
  5. Locate the patch to download.
  6. Click Download corresponding to the patch for the version of EE you're using.
  7. After the download completes, continue with the next section.

How to Apply a Magento Patch

To apply a Magento patch:

  1. Transfer the patch .sh file to your Magento installation root directory.

    Note: This article assumes your patch file name ends in .sh. If your patch file name ends in .patch or something else, contact Magento Support before proceeding.

    For example, /var/www/html/magento.
  2. Enter the following command as a user with sufficient privileges to write to Magento files (typically, the web server user or root):
    sh patch-file-name.sh

    A message such as the following displays to confirm the patch installed successfully:
    Patch was applied/reverted successfully.
  3. To reapply ownership to the files changed by the patch:
    1. Find the web server user: ps -o "user group command" -C httpd,apache2
      The value in the USER column is the web server user name.
      Typically, the Apache web server user on CentOS is apache and the Apache web server user on Ubuntu is www-data.
    2. As a user with root privileges, enter the following command from the Magento installation directory:
      chown -R web-server-user-name .
      For example, on Ubuntu where Apache usually runs as www-data, enter
      chown -R www-data .
  4. Perform any other tasks as instructed by Magento Support.
    (For example, some patches require you to stop external services, such as the Solr search engine.)

Reverting the Patch

If applying the patch results in errors, contact Magento Support. If you are instructed to do so, revert the patch:

  1. Change to your Magento installation directory.
  2. Enter the following command as a user with sufficient privileges to write to Magento files (typically, the web server user or root):
    sh patch-file-name.sh -R

Troubleshooting

If you get an error when you run the patch, use the following suggestions:

  • Verify the patch is located in your Magento installation root directory.
    Ubuntu example: /var/www/magento
    CentOS example: /var/www/html/magento
  • Verify you're running the patch with sufficient privileges.
    Typically, this means running it as the web server user or as a user with root privileges.
  • Try running the patch again.
    If problems persist, contact Magento Support.
  • ]]> How to Apply and Revert Magento Patches 2014-02-20T13:24:47+00:00 Working With Order Status in Magento Enterprise Edition (EE) and Community Edition (CE) http://www.magentocommerce.com/knowledge-base/entry/ce-ee-order-status http://www.magentocommerce.com/knowledge-base/entry/ce-ee-order-status

    Table of Contents

    Overview

    This article discusses how you can create custom order statuses for orders placed on your web store. Except where noted, the information in this KB article applies to:

    • Enterprise Edition (EE) 1.9 and later
    • Community Edition (CE) 1.5 and later

    All orders in your Magento CE or EE store have an order status associated with each order state. (An order state is a unique step in the order processing workflow.) You can see the status of an order on the Orders page (in the Admin Panel, click Sales > Orders).

    The following figure shows order workflow. Order states are represented by squares in the figure. You cannot modify order states. You can add, remove, assign, and unassign order statuses to an order state as discussed in Creating a New Order Status and Assigning it to an Order State.

    Understanding Order Status and Order State

    The following table lists the default set of order states and statuses provided with Magento CE and EE.

    Order status Order state
    Processing
    Pending Payment
    Suspected Fraud
    Payment Review
    Pending
    On Hold
    Complete
    Closed
    Canceled
    Pending PayPal
    New
    Pending Payment
    Processing
    Complete
    Closed
    Canceled
    On Hold
    Payment Review

    The next section discusses how to create a new order status and assign it to an order state. You can use the tasks discussed in the next section to add additional order statuses to an existing state as well.

    Creating a New Order Status and Assigning it to an Order State

    Each order state can have multiple order statuses assigned to it. You can define order statuses and assign those statuses to states as discussed in this section. For a review of order workflow (states and status), see Understanding Order Status and Order State.

    See one of the following sections:

    Creating a New Order Status

    This section discusses how to create a custom order status, assign the custom status to an order state, and to set a default order status for order states.

    For example, you might need a custom order status for orders—for packaging or backordered—or a status that is specific to your store. In this case you can create a descriptive name for the custom status and assign it to the associated order states in the order processing workflow.

    To create a custom order status:

    1. Log in to the Admin Panel as an administrator.
    2. Click System > Order Statuses.
      The following figure shows an example Order Statuses page.
    3. Click Create New Status in the upper right corner of the Order Statuses page.
      The following figure shows an example.
    4. On the New Order Status page, in the Order Status Information section, enter the following information:
      • Enter a Status Code to identify the status.
        For clarity, the code you enter should be descriptive. The first character in the field must be a letter. You can enter a combination of only lowercase letters (a-z), numbers (0-9), and underscore(_).
      • Enter a Status Label to identify the status setting in the Admin Panel and web store.
    5. In the Store View Specific Labels section, you can optionally specify labels for each store view or language.
    6. Click Save Status.

    Assigning an Order Status to an Order State

    This section discusses how to assign an order status—either an existing status or a custom status you created—to an order state.

    To assign an order status to an order state:

    1. Log in to the Admin Panel as an administrator.
    2. Click System > Order Statuses.
      The following figure shows an example.
    3. Click Assign Status to State in the upper-right corner of the page.
      The following figure shows an example.
    4. On the Assign Order Status to State page, in the Assignment Information section, enter the following information:
      • From the Order Status list, click the status to assign.
      • From the Order State list, click the corresponding order state.
      • Select the Use Order Status as Default check box to use the specified status value as the default for the selected state.
    5. Click Save Status Assignment in the upper-right corner.

    Unassigning an Order Status from an Order State

    This section discusses how to unassign an order status from an order state.

    Note: EE 1.13.1 and later only. You cannot unassign a status from a state if that status is currently being used. That is, if an order status is currently being used in your web store, you cannot unassign it.

    To unassign an order status from an assigned state:

    1. Log in to the Admin Panel as an administrator.
    2. Click System > Order Statuses.
    3. In the Action column on the right, click the Unassign link corresponding to the order status to unassign.
      In EE 1.13.1 and later, an error similar to the following displays if you attempt to unassign a currently used status:
      Status "name" cannot be unassigned. It is in used in number payment method configuration(s): 
      payment-method-list store-view-list
      For example,
      Status "Test" cannot be unassigned. It is in used in 3 payment method configuration(s): 
      Check / Money order [Admin, Main Website, Private Sales Website]
      To unassign such an order status, make sure no orders are using it.
    ]]>
    Working With Order Status in Magento Enterprise Edition (EE) and Community Edition (CE) 2013-11-19T10:24:32+00:00
    How to Use Redis with Magento Community Edition (CE) and Enterprise Edition (EE) http://www.magentocommerce.com/knowledge-base/entry/redis-magento-ce-ee http://www.magentocommerce.com/knowledge-base/entry/redis-magento-ce-ee

    Contents

    Overview

    Redis is an open source, Berkley Software Distribution (BSD) licensed, advanced key-value store that can optionally be used in Magento for back end and session storage. In fact, you can replace memcached with Redis.

    Following are some of the benefits Redis provides for Magento implementations:

    • Redis supports on-disk save and master/slave replication. This is a powerful feature not supported by memcached. Replication enables high availability by eliminating a single point of failure.
    • Redis can be used for PHP session storage.
    • Redis provides much better eviction control and its back end is written with eviction support in mind.
    • Redis supports multiple databases that use the same server instance so you can use different databases for the Magento cache, full page cache (EE only), and sessions without starting many processes listening on different ports.
    • Redis supports compression libraries gzip, lzf, and snappy. lzf and snappy are much faster than gzip.
    • Limits the number of concurrent lock requests before an HTTP 503 (Service Unavailable) error is returned.

    Requirements for Using Redis with Magento

    The following Magento editions support Redis session and back end caching:

    • Enterprise Edition (EE) 1.13 and later
    • Community Edition (CE) 1.8

    The preceding Magento editions support Redis server version 2.6.9 and later available from redis.io.

    In addition, you can optionally use the Redis extension for PHP version 2.2.3 or later if you're using Redis for back end caching; however, Magento works without this extension.

    Configuring Redis

    To use Redis with Magento, you must configure Magento to use Redis and you must install and configure the Redis server. These tasks are discussed in the following sections:

    Configuring Magento To Use Redis

    To use Redis with Magento, you only need to install and configure the Redis server. The integration between Redis and Magento is already included with Magento CE 1.8 and EE 1.13 and later versions. All you need to do is configure it.

    Important: The Cm_RedisSession module in CE 1.8 is disabled by default. Magento disables the module to avoid unnecessary connection tries to Redis when you choose to use file, database, or a different session storage method.

    To enable Magento to use Redis, perform the following tasks:

    1. Enable the Cm_RedisSession module.
      1. Open magento-install-dir/app/etc/modules/Cm_RedisSession.xml in a text editor.
      2. Change the value of <active> to true.
      3. Save your changes to Cm_RedisSession.xml and exit the text editor.
    2. Modify magento-install-dir/app/etc/local.xml.
      For configuration information, see the sample provided with Magento in magento-install-dir/app/etc/local.xml.additional and also see the Readme (session) and Readme (back end).
    3. Flush the Magento cache in any of the following ways:
      • If you have access to the file system as the owner of the files in the Magento installation directory, change to that directory and enter rm -rf var/cache.
      • Log in to the Admin Panel as an administrator. Click System > Cache Management, then click Flush Magento Cache at the top of the page.

    Installing and Configuring the Redis Server

    Get Redis server version 2.6.9 or later and configure it according to their documentation.

    You can optionally install the Redis extension for PHP version 2.2.3 or later as well, but Magento functions without it.

    Getting Support for Redis

    Important: Colin Mollenhour, the original author of Redis, does not provide support for Magento implementations. You can get support for Magento implementations in the following ways:

    Magento edition How to get help
    Magento CE and Magento EE
    Magento CE Submit bug reports
    Magento EE only Submit bug reports

    For More Information

    For more information about using Redis with Magento, see:

    Acknowledgement

    Magento acknowledges the contributions of Colin Mollenhour in providing the code for the Magento implementation of Redis.

    ]]>
    How to Use Redis with Magento Community Edition (CE) and Enterprise Edition (EE) 2013-09-26T19:51:47+00:00
    After You Install Magento: Recommended File System Ownership and Privileges http://www.magentocommerce.com/knowledge-base/entry/install-privs-after http://www.magentocommerce.com/knowledge-base/entry/install-privs-after

    Table of Contents

    Overview

    In a continuing effort to improve security and ease of use, Magento is updating its recommendations for file system permissions and ownership for the following Magento editions:

    • Magento Enterprise Edition (EE) versions 1.9 and later
    • Magento Community Edition (CE) versions 1.4 and later

    This article discusses recommended permission and ownership schemes to apply after you install Magento.

    The guidelines discussed in this article apply to:

    • New installations of or upgrades to the previously listed Magento versions only.
      The instructions might not work with older versions. If you have already installed Magento, you can optionally change your file system permissions and ownership as discussed in this article.
    • Supported operating systems only

    This article discusses the following permission and ownership schemes:

    • Post-installation for both a hosted Magento server and for a decided Magento server (in other words, you have root access on the server).
    • Securing extensions, recommended ownership and privilege settings to apply after you install Magento extensions.
      Typically, Magento extensions install with 777 (world-writable) privileges, which is undesirable from a security point of view.

    Terminology

    This article uses the following terminology:

    Hosted system
    A Magento server located on a hosting provider. A hosted system typically does not enable you to elevate to root. The web server typically runs as an ordinary user. Magento assumes you log in as this user to start and stop the web server and that you already own all the files and directories in the Magento installation directory. You can use chmod to change permissions on files and directories.
    Dedicated system
    A Magento server you control and operate. Unlike a hosted system, you can elevate to root and, as root, you can use the chown and chmod commands to set ownership and privileges in the Magento installation directory.

    Setting Privileges and Ownership After You Install Magento

    If you have installed Magento, you can set file system privileges and ownership as follows:

    • For a dedicated Magento server, you set ownership of files and directory as the web server user. You set privileges as 500 (directories) and 400 (files).
    • For a hosted Magento server on which the web server runs as the logged-in user name, you set privileges as as 500 (directories) and 400 (files).

    Note: In both hosted and dedicated systems, you set the privileges for the media/ and var/ directories at 700/600 because they must be writable.

    Following is an explanation of the privileges:

    • 500 permissions for directories (dr-x------) gives the web server user read and execute privileges to prevent the accidental deletion or modification of files in the directory. Other users have no access to Magento directories.
    • 400 permissions for files (-r--------) prevent any user (even the web server user) from overwriting files.
      This prevents attacks that depend on overwriting existing files with malicious content.
    • 700 permissions (drwx------) for the media/ and var/ directories give full control (that is, read/write/execute) to the owner and no permissions to anyone else.
    • 600 permissions (-rw-------) for files in the media/ and var/ directories enable the web server user to write to them and to overwrite them.

    Note: On a dedicated system, all commands discussed in this article must be entered as a user with root privileges. On a hosted system, commands must be entered as the web server user.

    To set up ownership and permissions on a dedicated Magento server:

    1. Dedicated Magento server only. As a user with root privileges, find the web server user:
      • Apache:
        • Ubuntu: grep User /etc/apache2/apache2.conf
        • CentOS: grep User /etc/httpd/conf/httpd.conf

          Note: The preceding paths are samples only. The paths to these .conf files on your system might be different. You can use the command whereis nginx to find the location of the configuration files.

        Typically, the Apache web server user on CentOS is apache and the Apache web server user on Ubuntu is www-data.
      • nginx: Open the nginx configuration file, typically /etc/nginx/nginx.conf. The user directive specifies the user name. It might run as the Apache user if Apache is installed on the same system.
    2. Change to the Magento installation directory.
      On CentOS, this is typically /var/www/html/magento. On Ubuntu, it is typically /var/www/magento.
    3. Dedicated Magento server only. As a user with root privileges, enter the following command to set ownership of the Magento installation directory and all its subdirectories:
      chown -R web-server-user-name .
      For example, on Ubuntu where Apache usually runs as www-data, enter
      chown -R www-data .
    4. Enter the following commands to set permissions:
      find . -type f -exec chmod 400 {} \;
      find . -type d -exec chmod 500 {} \; 
      find var/ -type f -exec chmod 600 {} \; 
      find media/ -type f -exec chmod 600 {} \;
      find var/ -type d -exec chmod 700 {} \; 
      find media/ -type d -exec chmod 700 {} \;

    Securing Magento Extensions

    If you set permissions and ownership as discussed in this article, you must change permissions temporarily to be able to use the Magento Connect Manager in the Admin Panel. (System > Magento Connect > Magento Connect Manager. (You can still install extensions manually, however; that is beyond the scope of this article.)

    You can confirm the issue when you access Magento Connect Manager in the Admin Panel. The following error displays on the Extensions tab page:

    Warning: Your Magento folder does not have sufficient write permissions.

    To use Magento Connect Manager, you must:

    1. Temporarily set 700/600 permissions on your Magento installation directory and subdirectories.
    2. Install the extension.
      Magento Connect Manager typically installs extensions with 777 (world-writable) permissions.
    3. Set permissions back to their recommended values.

    In addition, if you have a dedicated Magento server, you should check ownership of files and directories and reset them if necessary. Often, Magento Connect Manager installs extensions with user and group ownership both set to the web server user.

    Temporarily Resetting Permissions on Your Magento Installation Directory

    To temporarily set file and directory permissions so you can use Magento Connect Manager:

    1. Change to the Magento installation directory.
      On CentOS, this is typically /var/www/html/magento. On Ubuntu, it is typically /var/www/magento.
    2. Enter the following commands:
      find . -type d -exec chmod 700 {} \;
      find . -type f -exec chmod 600 {} \;
    3. Install your extension using the Magento Connect Manager.

    Restoring the Recommended Permissions

    Enter the commands discussed in this section to return permissions and ownership to their recommended values after you have installed extensions.

    To restore Magento installation directory permissions:

    1. Change to the Magento installation directory.
      On CentOS, this is typically /var/www/html/magento. On Ubuntu, it is typically /var/www/magento.
    2. Dedicated Magento server only. As a user with root privileges, enter the following command to set ownership of the Magento installation directory and all its subdirectories:
      chown -R web-server-user-name .
      For example, on Ubuntu where Apache usually runs as www-data, enter
      chown -R www-data .
    3. Enter the following commands to set permissions:
      find . -type f -exec chmod 400 {} \;
      find . -type d -exec chmod 500 {} \; 
      find var/ -type f -exec chmod 600 {} \; 
      find media/ -type f -exec chmod 600 {} \;
      find var/ -type d -exec chmod 700 {} \; 
      find media/ -type d -exec chmod 700 {} \;

    Applying Magento Support Patches

    Magento Support typically provides a shell script to patch various Magento issues. When you run the shell script, file and directory permissions are typically not changed; however, the files provided with the patch are owned by the user who applied the patch. If you have a dedicated Magento server, this is typically root; therefore, after applying the patch, you must change file ownership.

    If you are required to apply a patch provided by Magento Support, use the following process:

    1. Get the patch from Magento Support.
    2. Follow the instructions provided with the patch.
      Typically, you run a shell script as either a user with root privileges or as the owner of the Magento installation directory.
    3. If you ran the patch as the owner of the Magento installation directory, you're done. File permissions aren't usually changed; however, you should check and reapply file and directory privileges if necessary.
    4. If you ran the patch as a user with root privileges, use the following steps to reset file ownership:
    5. Dedicated Magento server only. Find the web server user:
      • Apache:
        • Ubuntu: >grep User /etc/apache2/apache2.conf
        • CentOS: grep User /etc/httpd/conf/httpd.conf
        Typically, the Apache web server user on CentOS is apache and the Apache web server user on Ubuntu is www-data.
      • nginx: Open the nginx configuration file, typically /etc/nginx/nginx.conf. The user directive specifies the user name. It might run as the Apache user if Apache is installed on the same system.
    6. As a user with root privileges, enter the following command from the Magento installation directory:
      chown -R web-server-user-name . For example, on Ubuntu where Apache usually runs as www-data, enter chown -R www-data .

    For More Information

    For more information about UNIX permissions, see the following resources:

    ]]>
    After You Install Magento: Recommended File System Ownership and Privileges 2013-12-09T09:51:23+00:00
    Before You Install Magento: Recommended File System Ownership and Privileges http://www.magentocommerce.com/knowledge-base/entry/install-privs-before http://www.magentocommerce.com/knowledge-base/entry/install-privs-before

    Table of Contents

    Overview

    In a continuing effort to improve security and ease of use, Magento is updating its recommendations for file system permissions and ownership for the following Magento editions:

    • Magento Enterprise Edition (EE) versions 1.9 and later
    • Magento Community Edition (CE) versions 1.4 and later

    The guidelines discussed in this article apply to:

    Terminology

    This article uses the following terminology:

    Hosted system
    A Magento server located on a hosting provider. A hosted system typically does not enable you to elevate to root. The web server typically runs as an ordinary user. Magento assumes you log in as this user to start and stop the web server and that you already own all the files and directories in the Magento installation directory. You can use chmod to change permissions on files and directories.
    Dedicated system
    A Magento server you control and operate. Unlike a hosted system, you can elevate to root and, as root, you can use the chown and chmod commands to set ownership and privileges in the Magento installation directory.

    Recommended Privileges and Ownership Before You Install Magento

    This section discusses Magento's pre-installation recommended privilege and ownership settings, which are as follows:

    • The Magento installation directory and all subdirectories are owned by the web server user.
      This enables the web server to change files in these subdirectories but other users cannot access them (except a higher-level user such as root).
    • All directories have 700 permissions (drwx------).
      700 permissions give full control (that is, read/write/execute) to the owner and no permissions to anyone else.
    • All files have 600 permissions (-rw-------).
      600 permissions mean the owner can read and write but other users have no permissions.

    Note: On a dedicated system, all commands discussed in this article must be entered as a user with root privileges.

    After you extract the Magento installation package, set ownership and permissions as follows:

    1. Dedicated Magento server only. Find the web server user:
      • Apache:
        • Ubuntu: grep User /etc/apache2/apache2.conf
        • CentOS: grep User /etc/httpd/conf/httpd.conf

          Note: The preceding paths are samples only. The paths to these .conf files on your system might be different. You can use the command whereis nginx to find the location of the configuration files.

        Typically, the Apache web server user on CentOS is apache and the Apache web server user on Ubuntu is www-data.
      • nginx: Open the nginx configuration file, typically /etc/nginx/nginx.conf. The user directive specifies the user name. It might run as the Apache user if Apache is installed on the same system.
    2. Change to the Magento installation directory.
    3. Dedicated Magento server only. Enter the following command to set ownership of the Magento installation directory and all its subdirectories:
      chown -R web-server-user-name .
      For example, on Ubuntu where Apache usually runs as www-data, enter
      chown -R www-data .
    4. Enter the following commands to set directory permissions to 700 and file permissions to 600:
      find . -type d -exec chmod 700 {} \;
      find . -type f -exec chmod 600 {} \;

    For More Information

    For more information about UNIX permissions, see the following resources:

    ]]>
    Before You Install Magento: Recommended File System Ownership and Privileges 2013-09-25T19:08:00+00:00