Hot answers tagged jail
As Kassandry said, you can't do this with a command within the jail itself. What you could do, however, would be to create a separate user (who I will henceforth call closer on the host system. This user should be blocked so that it can only log in with an SSH key. Your jailed user should have the private key and the password for the key. On the host ...
Jails specifically forbid the shutdown commands, per the manual page here. Normal machine shutdown commands, such as halt(8), reboot(8), and shutdown(8), cannot be used successfully within the jail. Additionally quoting from The Design and Implementation of the FreeBSD Operating System, Processes running within a jail are not permitted to perform ...
You probably need to add 127.0.0.1 to the jail, as jails will forbid binding to anything but the jail ip. But, if you want to confine mongo just to the jail, maybe a better idea would be to firewall it ... using 127.0.0.1 in jail could be wrong from security point of view.
There are multiple ways to setup chroot jails. Personally I've seen over 50 different scripts for that. All jails are similar, but have smaller or bigger differences, so there is no generic way to do anything inside them. The most common usage of chroot jails regarding installing software, is installing everything from source. Sometimes chroot jails are ...
Only top voted, non community-wiki answers of a minimum length are eligible