2

I am trying to install the security patches via SSH and I am getting the following errors:

www.mysite.com@www01:~$ sh ./html/PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh
./html/PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh: 24: 127: not found
./html/PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh: 24: 127: not found
./html/PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh: 29: cannot create 0: Permission denied
./html/PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh: 29: 0: not found
ERROR: "/www/sites/www.mysite.com/app/etc/" must exist for proper tool work.

www.mysite.com@www01:~$ sh ./html/PATCH_SUPEE-5344_CE_1.8.0.0_v1-2015-02-10-08-10-38.sh
./html/PATCH_SUPEE-5344_CE_1.8.0.0_v1-2015-02-10-08-10-38.sh: 24: 127: not found
./html/PATCH_SUPEE-5344_CE_1.8.0.0_v1-2015-02-10-08-10-38.sh: 24: 127: not found
./html/PATCH_SUPEE-5344_CE_1.8.0.0_v1-2015-02-10-08-10-38.sh: 29: cannot create 0: Permission denied
./html/PATCH_SUPEE-5344_CE_1.8.0.0_v1-2015-02-10-08-10-38.sh: 29: 0: not found
ERROR: "/www/sites/www.mysite.com/app/etc/" must exist for proper tool work.

Any ideas?

1

7 Answers 7

3

From the line in the error message:

ERROR: "/www/sites/www.mysite.com/app/etc/" must exist for proper tool work.

I think that one of two things is happening either:

  1. /www/sites/www.mysite.com is not your Magento root directory,
  2. /www/sites/www.mysite.com/app/etc/ does not have the right permissions set,

Problem 1 is easily sortable, simply cd into the correct Magento root directory. Problem 2 can be sorted by either applying the right permissions to the app/etc folder so that the script can create an applied patches xml file or make sure you are running the patch as the web user.

To apply the patch as the webuser try:

sudo -u www-data sh ./html/PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh

Please change www-data to be your webuser.

1

Disclaimer : This content is taken from DevDocs Site. Fore more details : Follow this link.

You need to ensure following points.

  1. Verify the patch is located in your Magento installation root directory.

    • Ubuntu example: /var/www/magento
    • CentOS example: /var/www/html/magento
  2. 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.

  3. Try running the patch again.

This is the official documentation about Magento Patches. Please have a look

1
  • Thank you very much Rajeev. I will confirm those notes and try again.
    – molivera7
    Commented Apr 21, 2015 at 1:19
1

The patches should be placed under Magento root directory and executed under Magento root directory:

$ cd html
$ sh ./PATCH_SUPEE-5344_CE_1.8.0.0_v1-2015-02-10-08-10-38.sh

Also, your sh shell seems to be very limited. You can try standard bash instead, just in case.

0

Problem was: CURRENT_DIR=$PWD_BIN/ (line 60) and the value of $PWD_BIN is defined in same file PWD_BIN=which pwd (line 35) as which doesn't wok on windows so we will need to replace this value.

Open bash
Your current directory should be the root of magento.
Run command 'pwd'
It will give the out path of your current directory: Check screenshot

Copy this path and edit file, on line 67 replace:

CURRENT_DIR=$PWD_BIN/ to CURRENT_DIR=/d/xampp/htdocs/magento/

Run patch with same commnd sh PATCH_SUPEE-5344_CE_1.8.0.0_v1-2015-02-10-08-10-38.sh

Note: Make sure you replace '/d/xampp/htdocs/magento/' with your directory root.

and it will work like a charm!!

original answer

0

Most likly the patches are already installed try :

Run via ssh sudo sh ./PATCH_SUPEE-5344_CE_1.8.0.0.sh -R

Then run sudo sh ./PATCH_SUPEE-5344_CE_1.8.0.0.sh

0

Success! i ran the following commands to execute with bash instead of sh, from the correct directory

www.mysite.com@www01:~$ cd /www/sites/www.mysite.com/files/html/
www.mysite.com@www01:~/files/html$ chmod +x PATCH*
www.mysite.com@www01:~/files/html$ ./PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh
Checking if patch can be applied/reverted successfully...
Patch was applied/reverted successfully.
www.mysite.com@www01:~/files/html$ ./PATCH_SUPEE-5344_CE_1.8.0.0_v1-2015-02-10-08-10-38.sh
Checking if patch can be applied/reverted successfully...
Patch was applied/reverted successfully.
0

Run

  1. pwd
  2. copy the path
  3. Find the root directory of your magento installation.
  4. run : cd /Copiedpath/rootfolder/
  5. then run sh filename.sh

it worked for me.

Not the answer you're looking for? Browse other questions tagged or ask your own question.