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

phpfpm module does not respect config.services.phpfpm.pools.<name>.user #312974

Closed
aftix opened this issue May 19, 2024 · 1 comment
Closed

phpfpm module does not respect config.services.phpfpm.pools.<name>.user #312974

aftix opened this issue May 19, 2024 · 1 comment

Comments

@aftix
Copy link

aftix commented May 19, 2024

Describe the bug

In the phpfpm module, there are the options userand group under services.phpfpm.pools.<name>. However, the module creates a systemd service for the pool that runs as root, ignoring these options.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Create a phpfpm pool using the nixos module on the nixos-unstable branch
  2. The resulting service file does not specify User=or Group=

Expected behavior

I expect the phpfpm pool services created to run as the configured user and group and not root.

Additional context

Notify maintainers

@aanderse
@drupol
@Ma27
@talyz

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.21-hardened1, NixOS, 24.05 (Uakari), 24.05.20240517.4a6b83b`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - nixpkgs: `/etc/nixpkgs/channels/nixpkgs`

Add a 👍 reaction to issues you find important.

@aanderse
Copy link
Member

this is by design

php-fpm runs the master process as root and then spawns child processes as the specified user and group values

@aftix aftix closed this as completed Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants