httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Richardson <>
Subject Re: [users@httpd] Scripts (perl) and the path used
Date Thu, 14 Aug 2003 05:06:21 GMT
On August 13, 2003 09:52 am, HAMILTON, DALE K (SBCSI) wrote:
> I'm not overly technical about UNIX or apache.  The question is when Apache
> spawns a Perl script for a CGI request, does it only use the path in the
> perl !# line or is there dependency on the root or user path that is
> running apache?

This would only be an issue if you run Apache in a chroot'ed environment (as I 
believe OpenBSD does). This is a nice security feature which keeps everything 
outside of your ServerRoot inaccessable to your webserver. The shebang line 
is relative to the chroot'ed jail. Thus, if you chroot to your ServerRoot, 
the file following #! must be relative to your ServerRoot, otherwise it will 
read the file relative to your root directory.


Few things are harder to put up with than the annoyance of a good example.
		-- "Mark Twain, Pudd'nhead Wilson's Calendar"

View raw message