Share This Post

Certainly, the 403 error permission denied is quite a pain. As it doesn’t necessarily help identify what the true issue is, a person can be left wondering what broke on their site. Recently when working on a clients site we ran across this issue.

Any product images that were upload simply would not display. When trying to look directly at the image in the browser, the response was a 403 error.

After troubleshooting to see what was wrong, it was identified that whenever a new folder or file was being created the folder was given the incorrect permissions. As this is controlled by the PHP settings we looked at the index.php where this is typically set in Magento. Sure enough when setting the site to development mode somehow the line of code

umask(0);

had been compromised. By resetting this back to umask(0); we were able to verify that file & folders were now being created with correct permissions again. Upon verifying that, we simply needed to reset all files to permissions of 644 & all folders to permissions of 755. This can be done either through SSH or through an FTP program such as FileZilla.

More To Explore

Do You Want To Boost Your Business?

An image of three people in a meeting looking at laptops