Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jan 2009 12:10:07 +0000
From:      Frank Shute <>
To:        Andy Smith <>
Subject:   Re: PATH used by www user
Message-ID:  <>
In-Reply-To: <>
References:  <> <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Mon, Jan 19, 2009 at 09:16:12AM +0000, Andy Smith wrote:
> > Quoting Frank Shute <>:
> >
> >
> >User www doesn't have a shell, profile & hence PATH.
> >
> >I don't know how your path is being set but it depends on perl & how
> >your script looks.
> >
> >Look at Env(3) & the other perldocs.
> >
> >If you want to do it quick, call traceroute with the path in your
> >scripts e.g:
> >
> >system "/usr/sbin/traceroute $some_host";
> >
> >There's probably a perl module with a "traceroute" in it but I'm
> >afraid I don't know it offhand.
> Hi Frank,
>   thanks for your responce, the PATH isn't set within the perl script  
> with ENV (and the script is identical on both systems). I've already  
> asked the question on the perl mailing list and came to the conclusion  
> the difference was something at the UNIX level on FreeBSD. There are  
> various ways I can easily work around it, but it just seemed so basic  
> I wanted to know how it was being set :S
> thanks, Andy.

Hi Andy,

I had to look at the Camel book & although it isn't explicit, it seems
like the script inherits the environment of the calling process i.e
Apache in this case. Apache sets the environment with SetEnv (or at
least 1.3 does, I don't run 2*) as it can't inherit one from user www
since it doesn't have one. So have you had a look at httpd.conf and
.htaccess on each machine?

BTW, one machine uses an "old" PATH with /usr/X11R6/bin in it. That
disappeared some time ago. That may or may not be a clue.

In short, I think this is probably an Apache question & you might have
more informative answers from there.

Sorry I can't be more helpful but quite a few Apache people run
FreeBSD and they're likely to be more help than I am.




 Contact info: 

Want to link to this message? Use this URL: <>