1

I have an error in a Magento 2 store and I cannot fix it. On homepage appears this:

 Error filtering template: Warning: imagepng(/var/www/domain/pub/media/e**hemes/resized/frontend/e**hemes/slideshow/b/a/image-1.png): failed to open stream: Permission denied in /var/www/domain/vendor/magento/framework/Image/Adapter/Gd2.php on line 181

File permisions are 777 on media and other subdirectories, also php-gd ..installed.

image-1.png can be accessed directly on browser.

Server Centos, Nginx, PHP 7

  • Do not use 777 permissions in a production environment. It leaves your site open to attacks from anyone. It could be an ownership issue. What user owns these files? – Steve Johnson Oct 10 '16 at 17:03
  • a user created by me, not root – George George Oct 10 '16 at 17:13
  • Is your user in the nginx group (or same group as the nginx process)? – Steve Johnson Oct 12 '16 at 17:47

Your Answer

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

Browse other questions tagged or ask your own question.