automatic creation of a chroot environment
- Reply: vermaden : "Re: automatic creation of a chroot environment"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 16 Jul 2026 01:49:11 UTC
Hi! I've been using chroot for a long time to reduce the risk of web application hacking on my server. Some time ago, I decided it was time to automate the creation of chroot environments and create a universal solution for any application/port that would be easily customizable. For simple applications and ports, it usually works with minimal effort, but for complex ones, it takes a bit more tinkering. The current implementation creates a RO chroot, without setuid files, with one user and one group. All RW locations are mounted with noexec and nosuid. This makes escaping such a chroot environment extremely difficult, and webshell and other PHP hacks become impossible. I hope someone finds this useful. https://github.com/rozhuk-im/chroot_env