You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Andy Smith <a....@ukgrid.net> on 2009/01/19 16:07:35 UTC
[users@httpd] Perl UNIX shell PATH problem with apache www user
Hi List,
probably quite a basic question, but where does perl get its PATH
variable from when executig shell commands?
My problem is running Tr.pm which is part of the open source tool
smokeping, it does some nice things with traceroute. The weird problem
I have is that I have the same version of smokeping and Rt.pm on two
different servers and on one I have been getting the error "traceroute
no such file or directory" and on the other it works fine. The
commands are being called through apache httpd 2.2.9 whcih is running
as www which has no homedir, and the /etc/profile is the same on both
servers there are no /etc/bash files. What else can be different
between them?
I can get the error to go away by putting traceroute in /usr/bin, but
Id like to know why the perl code is fine on one server and not on the
other.
This is my third attempt to work this one out :P I already asked on
the FreeBSD forums and PERL forums and so far everyone has been
stumped. So its gona be something obvious, or perhaps something odd
like a compiled in PATH in httpd possibly?? :S
thanks for any suggestions! Andy.
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Perl UNIX shell PATH problem with apache www
user
Posted by Andy Smith <a....@ukgrid.net>.
Hi Davide,
yep, apache is running as www, and has no homedir as I mention. And
yet the path that apache has set is different between my two servers.
My question is how if /etc/profile is the same and the user has no
home dir and the perl script is the same on both systems,
thanks, Andy.
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Perl UNIX shell PATH problem with apache www user
Posted by Davide Bianchi <da...@onlyforfun.net>.
Andy Smith wrote:
> Hi List,
>
> probably quite a basic question, but where does perl get its PATH
> variable from when executig shell commands?
By the PATH defined for the user that "runs" the web server, that most
of the time is the 'default' PATH.
> have is that I have the same version of smokeping and Rt.pm on two
> different servers and on one I have been getting the error "traceroute
> no such file or directory"
Traceroute is most of the time under /sbin, maybe you need to add it
specifically to the path or check the permissions
Davide
--
It's a lot less painful and more fun to learn from someone else's
experience than on you own skin. - Bob Arnold
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org