I was adding images to categories when I got the message of the new patch SUPEE-7405. So I added it and after installing SUPEE-7405 I can no longer add or change images in Categories. If I delete an image that is currently showing, and go back to re-add it, it only shows s a broken image now. Version 1.9.2.1, flushed cache, re-indexed, logged in/out, what now???
Solved! Go to Solution.
Hi all, two things:
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!
Hi @redqueensoft, one of the changes made in this patch is to the permissions on the /media folder which is why you're running into this issue. This change was made to address a PCI compliance issue. You'll need to check permissions of that directory and adjust in order to upload your images.
Hi Guys, the same is happening to me after applying the patch... no matter the media folder permissions are readjusted following cpanel guidelines I can not upload any image from the backend as previously done... Please, any solution or How do we need to set back the permissions for files and directories...?
Check lib/Varien/File/Uploader.php in the patch file
diff --git lib/Varien/File/Uploader.php lib/Varien/File/Uploader.php --- --- - chmod($destinationFile, 0777); + chmod($destinationFile, 0640); --- --- - if (!(@is_dir($destinationFolder) || @mkdir($destinationFolder, 0777, true))) { + if (!(@is_dir($destinationFolder) || @mkdir($destinationFolder, 0750, true))) {
I think you should change the media folder permission from 0777 to 0750 and files under media folder should have 0640 permission.(Try this on staging site first)
You can refer After You Install Magento: Recommended File System Ownership and Privileges but I think it is not updated with latest information.
I think @sherrie can confirm this for us.
@sherrie Can you confirm us the media permission issue after applying the patch?
I too am having this issue, however the broken images are only showing in the magento admin, they're working correctly on the front end.
Yes, exactly the same is happening to us....
Any clarification on this matter would be highly appreciated