Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission denied error when using distinct user accounts for nginx and php-fpm, no known errors when using the same account. #327

Open
jimgarrigan opened this issue Feb 22, 2024 · 5 comments

Comments

@jimgarrigan
Copy link

jimgarrigan commented Feb 22, 2024

Yes, I realize this issue has been previously submitted. I have not seen a resolution, a message which indicates the issue cannot be resolved, or a message which indicates the issue is being investigated.

Any assistance you can provide will be appreciated. Thank you :)

staging environment

Feb 22 14:35:02 XXXX hostname 2024/02/22 14:35:02 [error] 71253#71253: *486 FastCGI sent in stderr: "PHP message: PHP Warning: opendir(XXXXXXXXX fastcgi_cache/d): Failed to open directory: Permission denied in /usr/share/nginx/html/www/wp-content/plugins/nginx-helper/admin/class-purger.php on line 1237" while reading response header from upstream, client: XXXXXXXXXXXXX, server: XXXXXXXXXXXXX, request: "GET /wp-admin/network/plugins.php?_wpnonce=d7a3f1649d&nginx_helper_action=purge&nginx_helper_urls=all&plugin_status=all&s=nginx HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/www.sock:", host: "XXXXXXXXXX", referrer: "https://XXXXXXXXXXXX/wp-admin/network/plugins.php?plugin_status=all&s=nginx"

nginx version: nginx/1.25.4

PHP 8.2.9 (fpm-fcgi) (built: Aug 24 2023 20:35:20)
Copyright (c) The PHP Group
Zend Engine v4.2.9, Copyright (c) Zend Technologies
with Zend OPcache v8.2.9, Copyright (c), by Zend Technologies

WordPress (6.4.3)

NGINX Helper - Version 2.2.4

Nginx #259
I looked at: Conflict Fastcgi cache folder permissions with Nginx #259
I do have the proper purge module installed. https://github.com/FRiCKLE/ngx_cache_purge
I obtained the module from https://nginx-extras.getpagespeed.com/modules/cache-purge/ .
As noted in the title of my issue, I am encountering the same permission problem as noted in #259.

purge_all permissions problem #283
Same issue: However, when nginx is running as user nginx and PHP is ran as php, the purge_all does not have adequate permissions to clear the cache.

@DeeKey
Copy link

DeeKey commented Feb 27, 2024

Yes - this is an issue!
Why not to solve it by using nginx with srtcache module and Redis as a cache storage?
Redis has advantages over nginx cach!

@jimgarrigan
Copy link
Author

jimgarrigan commented Feb 27, 2024 via email

@josbroers
Copy link

@jimgarrigan maybe this comment can help you?

#63 (comment)

@jimgarrigan
Copy link
Author

jimgarrigan commented Apr 23, 2024 via email

@jimgarrigan
Copy link
Author

jimgarrigan commented Apr 28, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants