FS#64851 - [php-fpm] does not start because of missing permissions of unix socket
Attached to Project:
Community Packages
Opened by Fabian Franz (fabianfrz) - Sunday, 15 December 2019, 20:11 GMT
Last edited by Pierre Schmitz (Pierre) - Wednesday, 18 December 2019, 19:28 GMT
Opened by Fabian Franz (fabianfrz) - Sunday, 15 December 2019, 20:11 GMT
Last edited by Pierre Schmitz (Pierre) - Wednesday, 18 December 2019, 19:28 GMT
|
Details
Description:
PHP cannot change the owner of its socket and fails to start because of this. Possible Fix: /usr/lib/systemd/system/php-fpm.service -CapabilityBoundingSet=CAP_SETGID CAP_SETUID +CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_CHOWN Additional info: * package version(s) Name : php-fpm Version : 7.4.0-2 Description : FastCGI Process Manager for PHP Architecture : x86_64 URL : https://secure.php.net/ Licenses : PHP Groups : None Provides : None Depends On : php systemd Optional Deps : None Required By : None Optional For : None Conflicts With : None Replaces : None Installed Size : 16,07 MiB Packager : Pierre Schmitz <pierre@archlinux.de> Build Date : Sa 30 Nov 2019 10:43:49 UTC Install Date : So 15 Dez 2019 19:45:08 UTC Install Reason : Explicitly installed Install Script : No Validated By : Signature * config and/or log files etc. # relevant part of php config listen = /run/php-fpm/php-fpm.sock listen.owner = http listen.group = http Steps to reproduce: Update php-fpm to latest releast and start it up and it fails if you configured an unix socket with owner user and group. |
This task depends upon
FS#64781Dez 15 20:00:03 container systemd[1]: Failed to start The PHP FastCGI Process Manager.
Dez 15 20:00:03 container systemd[1]: php-fpm.service: Failed with result 'exit-code'.
Dez 15 20:00:03 container systemd[1]: php-fpm.service: Main process exited, code=exited, status=78/CONFIG
Dez 15 20:00:03 container php-fpm[1110]: [ERROR] FPM initialization failed
Dez 15 20:00:03 container php-fpm[1110]: [ERROR] [pool www] failed to chown() the socket '/run/php-fpm/php-fpm.sock': Operation not permitted (1)
Dez 15 20:00:03 container php-fpm[1110]: [ERROR] FPM initialization failed
Dez 15 20:00:03 container php-fpm[1110]: [ERROR] [pool www] failed to chown() the socket '/run/php-fpm/php-fpm.sock': Operation not permitted (1)
Dez 15 20:00:03 container systemd[1]: Starting The PHP FastCGI Process Manager...
In upstream the capabilities are not included anymore:
https://github.com/php/php-src/blob/master/sapi/fpm/php-fpm.service.in
IMHO we should backport this to the official package... https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/php&id=c4c2a570a0dcdba8f9cd910817d641a74c99a345 does not seem to be sufficient.