Xymon Mailing List Archive search

Perl

2 messages in this thread

list Henrik Størner · Thu, 3 Mar 2005 11:18:15 +0000 (UTC) ·
In <user-dd58c1639e93@xymon.invalid> lars ebeling <user-b8ea1138b488@xymon.invalid> writes:
this isn't for this mailinglist, but I have to every time change -wT
to -wt in maint.pl because executing gives an error:
Insecure directory in $ENV{PATH} while running with -T
From "man perlsec":

       For "Insecure $ENV{PATH}" messages, you need to set
       $ENV{'PATH'} to a known value, and each directory in the path
       must be non-writable by others than its owner and group.  You
       may be surprised to get this message even if the pathname to
       your executable is fully qualified.  This is not generated
       because you didn't supply a full path to the program; instead,
       it's generated because you never set your PATH environment
       variable, or you didn't set it to something that was safe.
       Because Perl can't guarantee that the executable in question
       isn't itself going to turn around and execute some other
       program that is dependent on your PATH, it makes sure you set
       the PATH.

Since maint.pl runs directly as a CGI from the webserver, I believe
you need to do some setup for the PATH that the webserver passes to
CGI's. Perhaps set the PATH setting before starting Apache ...


Regards,
Henrik
list Henrik Størner · Thu, 3 Mar 2005 12:28:00 +0100 ·
quoted from Henrik Størner
On Thu, Mar 03, 2005 at 11:18:15AM +0000, Henrik Storner wrote:
In <user-dd58c1639e93@xymon.invalid> lars ebeling <user-b8ea1138b488@xymon.invalid> writes:
this isn't for this mailinglist, but I have to every time change -wT
to -wt in maint.pl because executing gives an error:
Insecure directory in $ENV{PATH} while running with -T
Since maint.pl runs directly as a CGI from the webserver, I believe
you need to do some setup for the PATH that the webserver passes to
CGI's.
A bit of digging on httpd.apache.org reveals that adding

    SetEnv PATH /bin:/usr/bin:/usr/local/bin

to your httpd.conf should provide a reasonable PATH setting for your
CGI scripts. http://httpd.apache.org/docs-2.0/mod/mod_env.html#setenv


Henrik