Hello!
I’m using the Nginx FastCGI cache on Debian 7 and I’d like to allow PHP to delete Nginx’s cache files.
PHP-FPM runs as www-data.
Nginx runs as nginx.
/var/cache/nginx owner and group is root, permissions are 755 (drwxr-xr-x).
Directories in /var/cache/nginx are owned by nginx, group is root, permissions are 700 (rwx------). Files in /var/cache/nginx owner and group is nginx, permissions are 600 (rw-------).
How can permanently allow the user www-data to delete files in /var/cache/nginx?
I have minimal knowledge about unix user/groups or filesystem ACL’s, any leads appreciated!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Doh, thank you for the hint. I just changed the user in nginx.conf to www-data and it works perfectly. Thanks a lot!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.