Hi,

When php-fpm is configured to use chroot, it seems the php(1) cli still
tries to work unchrooted. So when running maintenance php scripts (like
occ from Nextcloud), errors raises for not finding resources (like mysql
socket etc).

I couldn't find a option for the php(1) command to "run as chroot".
I didn't want to copy php(1) and its deps into the chroot directory.

I could manage running the occ command by doing "dirty things":
  # doas sh -c "ln -s /var/www/htdocs /htdocs && ln -s /var/www/run /run"
  # doas -u www php occ db:convert-filecache-bigint
  # doas sh -c "rm /htdocs /run"

Is there a better way to handle chroot environnement when running php
scripts from the cli?

Thanks.

Reply via email to