0

this is from system.log. where should i look into to fix this problem?

  [2019-05-19 08:57:03] main.CRITICAL: Warning: imagepng(/home/user123/public_html/pub/media/captcha/base/6ee2xxxxxxxxxxxxxxxxxxxxxxxxxxx.png): failed to open stream: Permission denied in /home/user123/public_html/vendor/zendframework/zend-captcha/src/Image.php on line 588 [] []
    [2019-05-19 08:57:04] main.CRITICAL: Warning: imagepng(/home/user123/public_html/pub/media/captcha/base/e079xxxxxxxxxxxxxxxxxxxxxxxxxxx.png): failed to open stream: Permission denied in /home/user123/public_html/vendor/zendframework/zend-captcha/src/Image.php on line 588 [] []
    [2019-05-19 08:57:20] main.CRITICAL: Warning: imagepng(/home/user123/public_html/pub/media/captcha/base/ae84xxxxxxxxxxxxxxxxxxxxxxxxxxx.png): failed to open stream: Permission denied in /home/user123/public_html/vendor/zendframework/zend-captcha/src/Image.php on line 588 [] []
    [2019-05-19 08:57:21] main.CRITICAL: Warning: image
  • Change the permission of pub/media directory – Sohel Rana May 19 at 17:20
  • i believe my pub/media directory is set correct 755&664. upon checking, this 3 images file does not exist in that folder. how can i clear the error out? – Kris Wen May 19 at 17:29
  • something is calling those images. You are saying that those images do not exist? If that is the case it's possible that those images are cached. Try to clear the cache – Rafael Shkembi May 19 at 19:39
2

Try this commands as a root user

find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
sudo chown -R <Magento user>:<web server group> . 

It seems to be a permission issue only, if the image is not found there you will be getting file not found error. So try setting the permissions for existing files and newly created files using the above command and check if the issue still exists

  • 1
    I agree with this. PHP is trying to write the unique CAPTCHA image but does not have the required premissions, which is why the images are not present when you look for them – Anthony May 20 at 6:53
  • sounds like this is the issue. I have encounter a lot of permission issues since the site is transferred. However, i'm still find my <web server group> name, there is no "apache" or "www-data" exist in the server.. do you have any clue? it's liquidweb centOS. – Kris Wen May 20 at 17:19
  • Do you use a shared server or VPS or dedicated server? – Raj Mohan R May 20 at 17:20
  • Run this you will get web user name grep -E -i '^user|^group' /etc/httpd/conf/httpd.conf – Raj Mohan R May 20 at 17:47
  • dedicated server. should i need to run it as root? from my cpanel account it returned no such file or directory. – Kris Wen May 20 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.