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

PHP-FPM UID + GID incompatible with Nginx UID + GID #2204

Open
almereyda opened this issue Apr 25, 2024 · 1 comment
Open

PHP-FPM UID + GID incompatible with Nginx UID + GID #2204

almereyda opened this issue Apr 25, 2024 · 1 comment

Comments

@almereyda
Copy link

When using the Nextcloud image with the supplied Compose example there will be errors with retrieving files from the file system.

The error will be similar to:

stat() "/var/www/html/custom_apps/mail/img/mail.svg" failed (13: Permission denied)

as described in Proper permissions after upgrade/migration? - ℹ️ Support / 📦 Appliances (Docker, Snappy, VM, NCP, AIO) - Nextcloud community

It is useful to chown -R 33:101 the volume mapped into both containers for mitigation.

References:

user='www-data'
group='www-data'

https://github.com/nginxinc/docker-nginx/blob/1f227619c1f1baa0bed8bed844ea614437ff14fb/mainline/alpine-slim/Dockerfile#L15-L16

This extends:

Which other strategies have people found to resolve this, eventually without chown'ing the state?

Maybe it is easier nowadays to run from Caddy #2052?

Or it is better to build an Nginx container that runs from www-data/33 as well?

Surprised this hasn't come up earlier.

@tzerber
Copy link
Contributor

tzerber commented Apr 26, 2024

Can you post your compose file and OS variant/version? I have updated two production instances to 29 today, both are effectively a copy-paste from the fpm-nginx example (with some stuff added) and i have no such issues, they both have a bunch of apps including mail but no permission errors.

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

2 participants