- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all, two things:
- To fix existing uploaded images, you need to change ALL existing uploaded images permissions (chmod) from 0640 to 0644.
- 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);
tochmod($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!
Developer Relations, Adobe Experience Cloud
Problem solved? Click Accept as Solution!
Still stuck? Check out our documentation: https://magento.com/resources/technical
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: after installing SUPEE-7405 can no longer add or change images in Categories
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.
Developer Relations, Adobe Experience Cloud
Problem solved? Click Accept as Solution!
Still stuck? Check out our documentation: https://magento.com/resources/technical
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: after installing SUPEE-7405 can no longer add or change images in Categories
in order to be PCI compliant?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: after installing SUPEE-7405 can no longer add or change images in Categories
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...?
- Files uploaded via admin panel (i.e. product image upload) are now not world readable by default (before: 777 / after: 640).
- Directories are also not world executable (before 755 / after: 750). This two can cause issues with images not appearing on the website if the webserver runs as a different user from php (credits: @Rob Mangiafico)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: after installing SUPEE-7405 can no longer add or change images in Categories
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.
Problem Solved Click Accept as Solution!:Magento Community India Forum
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: after installing SUPEE-7405 can no longer add or change images in Categories
@sherrie Can you confirm us the media permission issue after applying the patch?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: after installing SUPEE-7405 can no longer add or change images in Categories
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: after installing SUPEE-7405 can no longer add or change images in Categories
Yes, exactly the same is happening to us....
Any clarification on this matter would be highly appreciated
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: after installing SUPEE-7405 can no longer add or change images in Categories
are cached from previous visits.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content