On Mon, Nov 17, 2025 at 11:20:36AM +0200, Masayoshi Fujimoto wrote: > Hi. I use OpenBSD 7.8. I cannot believe AI. ChatGPT says , In > OpenBSD, CGI execution is handled by slowcgi(8), and CGI programs are > executed outside the httpd chroot. Therefore: If Perl is available at > /usr/bin/perl, you do not need to copy it into /var/www You do not > need to copy any shared libraries Only the httpd process is affected > by the chroot slowcgi runs CGI programs without being chrooted This is > the correct behavior.
While normally I would recommend against listening to ChatGPT, in this case it is technically correct. You can tel slowcgi(8) to chroot to `/` and it will use the system perl without copying anything. I have some notes about how, when httpd is chrooted to /var/www, having slowcgi's root somewhere else can cause it some confusion that can be cleared up by making some "fake" files in the httpd chroot. https://gist.github.com/afresh1/b30e823770f2a38133c579321b6cbb4a You can also chroot slowcgi to a completely separate directory that is not shared with the system or httpd, but then you would need to copy perl into that location. However, that might make upgrades easier, being able to wipe that directory completely and repopulate it with the perl from the latest release. l8rZ, -- andrew Unix is very simple, but it takes a genius to understand the simplicity. -- Dennis Ritchie

