cancel
Showing results for 
Search instead for 
Did you mean: 

Media stuck in /tmp folder with 1.9.2.3

Media stuck in /tmp folder with 1.9.2.3

When we upload media using 1.9.2.3 hosted on a cPanel VPS at HostGator, the images are being uploaded to media/tmp/product/catalog/[x]/[x]/filename.jpg, however they are uploaded with 640 permissions, which prevents the web from seeing them.

 

I've tried adjusting /media file permissions, with no luck. The only errors logged are relating to a user attempting to view the image without proper permissions.

2 REPLIES 2

Re: Media stuck in /tmp folder with 1.9.2.3

You need to change their file permissions to the correct permission, which should be 644 for files and 755 for directories (this varies depending on your hosting environment). 

 

To fix it for the future, you would need to edit the file /lib/Varien/File/Uploader.php and change the line from:-

chmod($destinationFile, 0640);

to

chmod($destinationFile, 0644);

And:-

chmod($destinationFile, 0750);

to

chmod($destinationFile, 0755);

 

Re: Media stuck in /tmp folder with 1.9.2.3

Thanks. this is true for magento hosting on hostgator.