I'm trying to achieve rootless PHP-FPM pod running in Kubernetes.
I tried simply running process in Kubernetes pod via init script that does php-fpm -FO
as www-data
user but it complaints about not having permissions to access /dev/stderr
(log output location). Adding www-data
user to the tty
group also didn't help.
I tried specifying another location like /proc/self/fd/2
and even /dev/pts/1
as log location but to no avail.
Funny thing is, when I run docker run -itd app:latest su -l www-data -s /bin/sh -c php-fpm -FO &
, basically the same startup command via Docker directly, it starts and works just fine.
I don't have any securityContext
configured in Kubernetes that could affect process from starting normally.
Any suggestions/ideas to try?