PHP CLI in chroot Jail's

Operating system - Ubuntu Linux 22.04.2
Webmin version - 2.021
Usermin version - 1.861
Virtualmin version - 7.7
Perl version - 5.034000
Path to Perl - /usr/bin/perl
Python version - 3.10.6
Path to Python - /bin/python3
BIND version - 9.18
Postfix version - 3.6.4
Mail injection command - /usr/lib/sendmail -t
Apache version - 2.4.52
PHP versions - 8.1.2
Logrotate version - 3.19.0
MariaDB version - 10.6.12
ProFTPD version - 1.37
SpamAssassin version - 3.4.6
ClamAV version - 0.103.8


I have recently set up a brand new server as shown above with all the software versions.

I am trying to set up some cron jobs for users to automate some tasks, it requires php cli, and when I went to test the php via an SSH terminal as one of the jailed users, on testing, I am only getting “Bash: php: command not found”

While I can copy the program there, I was wondering if there is a built-in easier way to handle this so that when the php program gets updated, it will get updated in the jail also.

Thank you

You need to add any binaries to the jails that need to use those binaries. There is a Jailkit module for editing jail configuration, or you can modify the config files manually. You can use the jk_cp command to copy programs into an existing jail.

Thank you so much for the reply
When using the search from the Webmin tab, I searched for:
jail and chroot, the only result is Fail2Ban intrusion detection.

Thank you for your help

It’s in Webmin->System->Jailkit Jail Manager, in case you hadn’t found it yet.

The picture attached shows all of system, also searched for jail manager and, I also looked in un-used modules as well.

Thank you

Huh. webmin-jailkit is somehow no installed, I guess.

You can install it with apt install webmin-jailkit.

When did you install Virtualmin? Are your repos on /vm/6 or /vm/7 URLs?

Brand new install in the past 5 days, they should be /vm/7. upon running apt-get update, I saw /vm7

Thank you very much

I don’t seem to be able to edit my post, when trying to install the webmin-jailkit it says:
"Package webmin-jailkit is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘webmin-jailkit’ has no installation candidate"

Thank you

however, there appears to be a webmin-webmin-jailkit… If you will be fixing this, I will not go with that option.

Thank you

Agh. That’s a bug in my build scripts. I can’t believe nobody has noticed.

I’ll fix it, but not in the next few hours. You could install that package, but it’ll be a bit weird (it’ll work, but when the new package arrives and you install it you could have two Jailkit entries in the menu, though it’d be fine to remove the weirdly named one once that happens). It’s just on a different path than it’s supposed to be because the module is in a git repo named webmin-jailkit and my build script doesn’t handle renaming it. The module is stateless other than its own configuration, it’s just a GUI on top of the jailkit config files.

I will not install it right now, I understand it will not be right away. If you could reply to this post when you do get it fixed I would greatly appreciate it.

Thank you

for general future reference, on my RedHat system, it shows up in the Virtualmin repo named


IF I am looking at the right thing :slight_smile:


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.