Closed skilip closed 7 months ago
Adding a user with the same UID as the value passed via PHP_FPM_USER
solves this. Might not be the most proper solution though.
why do you change the fpm user? if you need the default user with uid 501 you should just use -dev-macos
image variants
I'm also in a situation where I needed to change the FPM user (to wodby, uid 1000 gid 1000) in order to match the UID of the owner of the folder (a bind mount volume) on my machine, while avoiding permission issues - i.e. so that php-fpm can write files in a subdirectory of the bind mount.
I know the wodby user is added to the www-data group, cf. https://github.com/wodby/php/blob/master/7/Dockerfile#L39, but I still had errors like https://www.drupal.org/project/drupal/issues/2685957
If the
PHP_FPM_USER
environment variable is set and SSMTP is used to send mail by setting the environment variablePHP_SENDMAIL_PATH
to `'"/usr/bin/dos2unix -u | /usr/sbin/ssmtp -t -f"'`` ssmpt fails to send mails.In the PHP container I stumbled upon this log message:
After removing the environment variables
PHP_FPM_USER
andPHP_FPM_GROUP
from docker-compose.yml the error dissappeared and SSMTP started working as expected.I assume that the PHP FPM user should be known by, or ran by, SSMTP.
Since we need to change the
PHP_FPM_USER
to avoid file permission issues between Host OS and Docker containers we would be very glad if this issue is addressed.