Magento – Magento image up loader is not working (403 error)

magento-1.9

I've a weird problem with Magento. I'm not able to upload any new product images. In my Nginx error log I am seeing a 403 error for the image when uploading. The strange thing is that the images are actually in TMP folder, but they are not showing up in the admin. Another strange thing is that the older images are showing up for all the products. I've checked all my file permissions and ownership, but nothing is working.

What is wrong?

Best Answer

HTTP 403 means "Forbidden": it seems that the user trying to upload the image doesn't have the rights to perform the operation.

Try to identify the user running the web server with the following shell command:

ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\  -f1

Unless your upload folders have 777 access permissions (not recommended), the user running the web server should be in the same group of the user which owns the upload folders or should be the owner itself.

Hope it helps.

Related Topic