Errors installing PHP FPM

August 15, 2018 4.3k views
PHP Ubuntu 16.04

Trying to follow a guide on iRedMail’s installation, but I can’t get any further as I can’t install the FPM module for PHP. This is the error I get:

Aug 15 20:00:58 <my mail server> systemd[1]: Starting The PHP 7.0 FastCGI Process Manager...
Aug 15 20:00:58 <my mail server> php-fpm7.0[22519]: [15-Aug-2018 20:00:58] ERROR: [pool root] please specify user and group other than root
Aug 15 20:00:58 <my mail server> php-fpm7.0[22519]: [15-Aug-2018 20:00:58] ERROR: FPM initialization failed
Aug 15 20:00:58 <my mail server> systemd[1]: php7.0-fpm.service: Main process exited, code=exited, status=78/n/a
Aug 15 20:00:58 <my mail server> systemd[1]: Failed to start The PHP 7.0 FastCGI Process Manager.
Aug 15 20:00:58 <my mail server> systemd[1]: php7.0-fpm.service: Unit entered failed state.
Aug 15 20:00:58 <my mail server> systemd[1]: php7.0-fpm.service: Failed with result 'exit-code'.
dpkg: error processing package php7.0-fpm (--configure):
 subprocess installed post-installation script returned error exit status 1
2 Answers

Hello friend!

Have you made a custom configuration for php-fpm on this system? This line seems to suggest that it is configured to run as root:

Aug 15 20:00:58 <my mail server> php-fpm7.0[22519]: [15-Aug-2018 20:00:58] ERROR: [pool root] please specify user and group other than root

Ideally it should run as a privileged user (www-data is a common example), and it may not start when configured to run as the root user.

Kind Regards,
Jarland

  • I’m unsure as to where I should check to see how it is configured to run, where would I look?

    • Good question! Technically this can vary, but if I were to guess, I’d say here:

      /etc/php/7.0/fpm/pool.d/www.conf

      You could try something like this to confirm:

      grep -R “user =” /etc/php

      This is what my user and group setting show in that file on my server:

      user = www-data
      group = www-data
      

@jtittle Hello we need some help for our website on Digital Ocean. When we try to configure website via Wordpress/Flatsome Ux builder tool or when we try to import products via All Import plugin we are getting 504 errors. Digital Ocean Contol Panel is showing high PHP-FPM usage during proccesses. Now we can neither configure home page nor import products to our web site. Can you have a look to investigate the problem and suggest us a solution?

Have another answer? Share your knowledge.