Skip to content

php-fpm executing php-scripts as root  #373

Open
@psy0rz

Description

See https://github.com/magento/magento-cloud-docker/blob/develop/images/php/8.3-fpm/etc/php-fpm.conf#L6

There is no user directive, so by default php-fpm will try to run as root, which is allowed since the -R flag is used: https://github.com/magento/magento-cloud-docker/blob/develop/images/php/8.3-fpm/Dockerfile#L151

This in turn can create files as root, like stuff in /app/generated/...

Then when trying to switch to and from developer mode from the cli container (as user www), you will get permission issues.

Very strange that this is the default for an official magento container, is has to be a bug right?

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions