On reboot the wrong chroot jail is entered in php-fpm configurations

I am running Virtualmin on OpenSuse 15.1 with chroot jails. Every time I reboot the server (patches) in each of the sub servers the wrong chroot jail is added to the config file in /etc/php7/fpm/pool.d. It seems to always default to the first virtual server that was created and I have to manually change the chroot = in each file to point to the proper parent. This has happened in previous versions of Virtualmin so it is not a regression. I am not sure where the mapping file is located to provide better information on why this may be happening. I am also not sure if this is an OpenSuse issue or if I installed something incorrectly. Any pointers or thoughts would be welcomed.

Status: 
Active
Virtualmin version: 
6.12
Webmin version: 
1.955

Comments

Is this happening when you reboot the system, when you upgrade Virtualmin, or when some other package is upgraded?

Any thoughts on this?

See my comment above - is this happening on every reboot, or only when you have updated packages?

This issue is still happening. It also is triggered when adding a new host so I am becoming certain this is a bug in Virtualmin.

Is the wrong path added to just the config for the domain you added, or existing ones?

Ok funny issue my browsers content blocker removed the replies so i was not seeing them. The issue happens when i reboot the server or add another server. Several of the hosted accounts rewrite the chroot jail to the first account I added (a personal domain used for testing) and I have to go to /etc/php/fpm/pool.d and correct all of the chroot jails to match what they should be. This happens on both domains and subdomains.

Is the chroot path for all of your domains being updated, or just some of them? If it's just some, are they all sub-domains of a single parent server?

It is not all of my servers just servers with children. If the server does not have a child it is never overwritten. And it is multiple servers with children not just one.

So for domains where it's set wrong, is the root being set to the home directory of one of the children, the home dir of the parent, or some completely different domain?

No what happens is on reboot all child domains get the chroot jail of the 1st server I created that has no children. Example below. domaina.com 1234 parenta.com 3456 chailda1.com 1234 chailda2.com 1234 domainb.com 5678 parentb.com 8901 childb1.com 1234

Hopefully that makes sense.

What's really odd is that Virtualmin doesn't run any code at boot time, other than starting it's own webserver. Unless you've created a bootup action to run something like virtualmin check-config ?

I have not setup anything at boot (On purpose at least) and it does not happen every single reboot. It seems to be a reboot after adding a new child domain or maybe even a new domain (I don't reboot quite often enough to really tell which) I wonder if that is rewriting and not fully restarting php-fpm which seems the most reasonable to me. Can you tell me where the chroot jails are stored. Maybe I can look there and see if something is not quite right.

Ah ... maybe it happens more often, but because the FPM config isn't valid it doesn't get reloaded until reboot.

So where does virtualmin pull the chroot jails from? The fact that is is ALWAYS the first chroot jail seems like where the issue lies. I suspect it is just not pulling in the parent chroot in in the script that writes the FPM config.

You can see the chroot jail by running a command like virtualmin list-domains --domain example.com --multiline and looking for the "Jail directory" line.

Ok this is interesting. The sub domain I checked does not list a Jail directory: at all. Should it or does it inherit that from the parent?

Yes, all sub-servers inherit the jail from their parents (because the jail exists at the user account level).