• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue [Crit] Nginx Error: Permission to images denied?

Jay Pee

New Pleskian
Hi I am running CentOS6, Fast CGi, php 7.3.7 with WP sites on my server.

On ALL domains I'm getting the exact same error message in each of their logs:

[crit] 12581#0: *1191748 open() "/var/www/vhosts/websitename.co.uk/httpdocs/wp-content/uploads/2019/06/image-files.jpg" failed (13: Permission denied).

Occasionally with stat() too.

The images load correctly on the sites and the sites run as expected. It appears that it is a permissions issue i.e. Nginx can't access the image, am I correct?

I have checked via SFTP the file permissions for all folders down the chain from httpdocs/ down to the actual images and the permissions appear correct. Owner correct for domain, permissions 755. Groups within the httpdocs folder set to psacln.

I have run: plesk repair fs websitename.co.uk
Checking virtual hosts' file system ................................. [OK]
Error messages: 0; Warnings: 0; Errors resolved: 0

I'm stumped a little, is it possible Nginx needs to be added to the group somehow?

Sidenote:
The only additional information would be that I tried to add php-fhm a while back unsuccessfully, it just broke the sites so I reverted back to fast-cgi php with Nginx directives set.

Best regards!
 
Last edited:
It looks like this is your case since your server is running on CentOS6:
Static content (CSS and images) is not loaded by browser: 13: Permission denied

Hi @IgorG, thank you for your reply. I have now tried this and eliminated this, still the same unfortunately. I did check the direct link to the images per the error log and they all deliver in the browser as before correctly.

When I clear the browser cache and refresh the page, for instance on a page with 10 images, 10 error lines come up to match (yet the images all display correctly to the visitor).

In the WP admin panel, when refreshing it is the same: .png, .gif, .woff, .jpg, .ico all show with same nginx error lines. I have disabled everything and the error persists with no extensions running, I am quite satisfied it is now server/Plesk based.

nginx error
[crit] 54391#0: *799 open() "/var/www/vhosts/websitename.co.uk/httpdocs/image-files.jpg" failed (13: Permission denied)
 
Back
Top