cancel
Showing results for 
Search instead for 
Did you mean: 

after installing SUPEE-7405 can no longer add or change images in Categories

SOLVED

Re: after installing SUPEE-7405 can no longer add or change images in Categories

Thanks for your help. It appears that the issue is not if the image file
uploads - it does. I found it in the folder just where it was supposed to
be.

It seems that the issue is that the code that should show its path doesn't
get changed. Maybe the file permissions need to be changed there for file
access?

Re: after installing SUPEE-7405 can no longer add or change images in Categories

Could someone please share instructions Where and How to change permissions ?
I uploaded images to product and they are shown as broken in backend, but visible on front-end.

Re: after installing SUPEE-7405 can no longer add or change images in Categories

I had the same problem. Saw that the file permission were 640 on the  newly uploaded images and I was manually changing them 0750.  Below is what I did to fix it.

 

Download this file via FTP - /lib/Varien/File/Uploader.php

Open in text editor like Sublime Text

 

Find this at Line 219:

chmod($destinationFile, 0640);

 

Change to:

chmod($destinationFile, 0755);

 

Save. Then upload the file via FTP and overwrite the existing. 

 

EDIT - This will fix the issue going forward, but you still have to change the permissions on everything in the folder where you store your images. I t

 

 

 

Re: after installing SUPEE-7405 can no longer add or change images in Categories

I found this line and it shows 

 chmod($destinationFile, 0640; I will try to change it to 755 

Re: after installing SUPEE-7405 can no longer add or change images in Categories

Thank you! Great solution!

Re: after installing SUPEE-7405 can no longer add or change images in Categories

I'm wondering if it could have other effects with future patches... I mean, is that the right way to do it...? Why the official patch is not working out of the box? 

Re: after installing SUPEE-7405 can no longer add or change images in Categories

Great job! Now everything seems to work.

The only question I have is: will we still pass PCI compliance with this
fix? Does anyone know?
Magento
Meetup Groups

Re: after installing SUPEE-7405 can no longer add or change images in Categories

Hi all, two things:

 

  1. To fix existing uploaded images, you need to change ALL existing uploaded images permissions (chmod) from 0640 to 0644.
  2. To fix it for the future, you would need to edit /lib/Varien/File/Uploader.php and change the line from (after applying the patch)
    chmod($destinationFile, 0640);
     to
    chmod($destinationFile, 0644);
    There is a similar one for directories that you'll need to change from 0750 to 0755.

However, if you're not on shared hosting, the best solution is to have PHP and web servers share user group.

 

Hope this helps!

--

Community Manager, Magento
Problem solved? Click Accept as Solution!
Still stuck? Check out our documentation: https://magento.com/resources/technical

Re: after installing SUPEE-7405 can no longer add or change images in Categories

Editing that file and changing both worked for me! thanks @sherrie 

Magento
Meetup Groups

Re: after installing SUPEE-7405 can no longer add or change images in Categories

Happy to hear that @baghulia, thanks for reporting back! Smiley Happy

--

Community Manager, Magento
Problem solved? Click Accept as Solution!
Still stuck? Check out our documentation: https://magento.com/resources/technical