Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jan 2009 06:01:51 +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 Sun, Jan 18, 2009 at 03:47:24PM +0000, Andy Smith wrote:
> Hi,
>   I'm trying to work out why the PATH is different for the www user  
> on two different FreeBSD servers. The problem being that on one it  
> cant find the traceroute binary (via a perl script hosted on apache  
> 2.2). The www user on both is the FreeBSD default, so has no home  
> directory on either. The /etc/profile is the same on both servers,  
> also the login.conf have the same path value set and there are no  
> /etc/bash files. But still on one server the path is  
> /sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin 
> and on the other only /bin:/usr/bin.
> Can someone tell me where the path may be being set that I havent looked?

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.




 Contact info: 

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