I Installed PHP-8 following this german advice:
https://schroederdennis.de/allgemein/php-81-installieren-updaten-debian-...

After the installation I stumbled over Webmin not being accessible. After looking around I found turnkey-init-fence being active. Zhis also affects shellinabox. Disabling the service makes it function again.

Does anybody have an explanation why this happens? 

Thanks, Birger

Forum: 
Jeremy Davis's picture

Can you please check your /etc/default/inithooks content? I'm especially interested in the value of 'RUN_FIRSTBOOT'. It should be 'false'. If it's 'true' then something went wrong when you first initialised your server!

FWIW the "init fence" is a service that intentionally blocks access to everything other than SSH. When you first log in, you should go through the first boot scripts, setting passwords, installing sec updates, etc (exact requirements depend on which appliance).

Towards the end of the firstboot run, '97turnkey-init-fence-disable' (/usr/lib/inithooks/firstboot.d/97turnkey-init-fence-disable) should disable the init-fence - essentially runs these commands:

systemctl disable turnkey-init-fence
systemctl stop turnkey-init-fence
chmod -x $HOME/.profile.d/turnkey-init-fence
chmod -x /usr/lib/inithooks/firstboot.d/??turnkey-init-fence*

My suspicion is that it is coincidental that you noticed it after updating PHP. If you rebooted the server after doing that, it may be that the initial run of the inithooks didn't complete successfully?

cat /etc/default/inithooks

INITHOOKS_CONF=/etc/inithooks.conf
INITHOOKS_PATH=/usr/lib/inithooks

RUN_FIRSTBOOT=false
REDIRECT_OUTPUT=true
SUDOADMIN=false

/etc/default/inithooks changed after installation, etckeeper git log at Jul 18, 15:33

/etc/default/inithooks file date Jul 20, 09:15

Started Installation of PHP-8 at Jul 20, 09:42 following the above mentioned description. 

So everything looks good. The other files have no executable flag set. I have no idea what happened. 

Jeremy Davis's picture

Hmm, that is very strange! I do not understand what happened either? Regardless, now that the fence has been disabled and inithooks appears to be as it should be, hopefully you should be good going forward.

Regardless, if something similar occurs again, please do let me know and we can try again to work out what is going on...

Add new comment