MilesWeb
MilesWeb Hosting Forum

Please login or register.

Login with username, password and session length

 

News:

SMF - Just Installed!


Author Topic: Images uploaded via Magento admin have incorrect permissions  (Read 6661 times)

0 Members and 1 Guest are viewing this topic.

Offline Administrator

  • Chinmay Dingore
  • Administrator
  • Full Member
  • *****
  • Posts: 135
  • Karma: +1/-0
    • View Profile
    • MilesWeb Internet Services Pvt Ltd
Images uploaded via Magento admin have incorrect permissions
« on: February 02, 2016, 12:12:37 PM »
Hi All,

When you upload the image via Magento admin panel, it might be that the images are not getting displayed and a thumbnail does not gets created. When you try to browse the image using a valid link it shows 404 Not Found Error.

The images gets uploaded under your account & you can view it using File Manager as well. If you have a close look at the file permissions, you will notice that the permissions on files is set to 640. With these permissions you won't be able to browse the images and that is the reason thumbnails are not getting generated and neither it does show the images in products.

This is due to the permission set when files are uploaded is incorrect in lib/Varien/File/Uploader.php. Simply open the file which should be under the root directory of your magento installation.

Quote
# vi lib/Varien/File/Uploader.php

Look for

Quote
chmod($destinationFile, 0640);

Set it to

Quote
chmod($destinationFile, 0644);

Save the file & exit.

When you upload the images and products now, correct permissions will be set on the images and it will generate the thumbnails as well as show the product images.

Quote
Looking for quality Magento hosting? Look no further than MilesWeb's Best Magento Hosting plans.
« Last Edit: December 08, 2016, 08:40:48 PM by Turkey »
MilesWeb.com - Your Hosting, Our Responsibility!
Unlimited Hosting Plans | Managed VPS with 10% Discount

MilesWeb Hosting Forum

Images uploaded via Magento admin have incorrect permissions
« on: February 02, 2016, 12:12:37 PM »