Step 2: Set the Necessary Permissions

For a live store, permissions are locked down to prevent unauthorized access. However, you
must change the permissions of the contents of the Magento installation folder before you can
install the patch. In the following instructions, Putty is used to access the command line and
change the permissions.
1. Click the Start button in the lower-left corner of your desktop, and launch Putty. When
prompted, enter the Host Name or IP Address of your store, and click the Open button.
2. Servers have different directory structures, and the path to your Magento installation folder is
most likely different from the one shown in the examples. Depending on your server, the path
to your Magento installation folder might be one of the following:

From the command line, use the Change Directory command to navigate to your Magento
installation folder. In this example, Magento is installed on a CentOS server, and the Magento
installation folder is located three levels below the html folder.
cd /var/www/html/stores/ce/magento
3. List the directory to check the permission status of the magento folder. To install a patch, you
must temporarily change the folder permissions. After the patch is installed, you can restore
the appropriate permissions to your live store.
ls -l
If you get a “Permission denied” message, add sudo to the beginning of the List Directory
sudo ls -l
The second column shows the current permission settings for the contents of the magento
folder. It includes a combination of read only, read/write, and execute permissions, depending
on the type of folder or file. Take note of the owner and group in the next two columns. You
probably won’t need this information, but it’s good to know. In this example, each folder and
file is owned by the apache user and belongs to the root group.

4. To install a patch, you must change the permissions to allow the necessary files to be copied
and overwritten, and to make it possible for the script to execute. Enter the following
commands to change the permissions of the directories and files in the folder. Then, list the
To save time, copy each command from the example, and press the mouse button to paste it into
the command line.
Open Up Permissions
find . -type d -exec chmod 700 {} \;
find . -type f -exec chmod 600 {} \;
ls -l
If your Magento installation is on a shared virtual server, you might need to begin each
command as a sudo super administrator:
sudo find . -type d -exec chmod 700 {} \;
sudo find . -type f -exec chmod 600 {} \;
sudo ls -l
The first column in the directory shows the updated permission settings. After the patch is
installed, you will restore the recommended permissions to your store.

Leave a Comment

Your email address will not be published. Required fields are marked *