SLES 15 SP6: ERROR: unable to bind listening socket for address '/run/php-fpm/www.sock': Permission denied (13)

Hello

I get the following error when installing according to your instructions for SLES15 Sp6:

ERROR: unable to bind listening socket for address ‘/run/php-fpm/www.sock’: Permission denied (13)

Is a new Install.

I have created cert.pem and key.pem. These are OK. But the last Step:

Setting up SSL…
Do you want to setup a SSL certificate and enable HTTPS now?
- manual: Prompts for the path of user uploaded ssl certificates and set up
nginx
- auto: Will issue a free SSL certificate with https://www.letsencrypt.org
and set up nginx
- none: Do not setup HTTPS at all

  1. manual
  2. auto
  3. none
    #? 1
    Enter the path to the SSL certificate: /root/cert.pem
    Enter the path to the SSL privkey: /root/key.pem
    =============================
    Installing os dependencies…
    =============================

====================================
Opening ports 80 and 443 on firewall

success
success

Setting up nginx…

Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /usr/lib/systemd/system/nginx.service.
/usr/local/bin/passbolt-configure: line 645: [: missing `]’
extension=gnupg.so
Created symlink /etc/systemd/system/multi-user.target.wants/php-fpm.service → /usr/lib/systemd/system/php-fpm.service.
Job for php-fpm.service failed because the control process exited with error code.
See “systemctl status php-fpm.service” and “journalctl -xeu php-fpm.service” for details.
lxsls702t:~ # systemctl status php-fpm.service
× php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Fri 2024-08-09 13:59:10 CEST; 9s ago
Process: 7366 ExecStart=/usr/sbin/php-fpm --nodaemonize --fpm-config /etc/php8/fpm/php-fpm.conf (code=exited, status=78)
Main PID: 7366 (code=exited, status=78)
CPU: 151ms

Aug 09 13:59:09 lxsls702t systemd[1]: Starting The PHP FastCGI Process Manager…
Aug 09 13:59:10 lxsls702t php-fpm[7366]: [09-Aug-2024 13:59:10] ERROR: unable to bind listening socket for address ‘/run/php-fpm/www.sock’: Permission denied (13)
Aug 09 13:59:10 lxsls702t php-fpm[7366]: [09-Aug-2024 13:59:10] ERROR: FPM initialization failed
Aug 09 13:59:10 lxsls702t systemd[1]: php-fpm.service: Main process exited, code=exited, status=78/CONFIG
Aug 09 13:59:10 lxsls702t systemd[1]: php-fpm.service: Failed with result ‘exit-code’.
Aug 09 13:59:10 lxsls702t systemd[1]: Failed to start The PHP FastCGI Process Manager.

Can you help me?

Checklist
[ x] I have read intro post: About the Installation Issues category
[x ] I have read the tutorials, help and searched for similar issues
[ x] I provide relevant information about my server (component names and versions, etc.)
[x ] I provide a copy of my logs and healthcheck
[x ] I describe the steps I have taken to trouble shoot the problem
[x ] I describe the steps on how to reproduce the issue

Hi

Ran into the same problem… and after spending an evening I found out that it was AppArmor that was messing things up.

So do the following:

Install AppArmor Tools:

sudo zypper install apparmor-utils

Put AppArmor in “complain” mode for php-fpm (this logs denials instead of blocking):

sudo aa-complain /usr/sbin/php-fpm

Restart the failing service:

systemctl restart php-fpm.service

Use “aa-logprof” to review the new denial messages and add the necessary rules:

sudo aa-logprof

And finally re-enable enforcing mode:

sudo aa-enforce /usr/sbin/php-fpm

After this you should be able to restart php-fpm.

Best regards
'Adder

Hi

After testing the install… and the startup of the webinterface - I think it would spare a lot of headaches if you remove AppArmor from the install of the server.

Unless there is a preconfigured php-fpm AppArmor rule provided, you will discover that it really needs a lot tweaking… and I’m sure it’s not enough yet, as I haven’t been out in all the corners yet.

Best regards
'Adder