You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chris French <ch...@opengroup.org> on 2004/08/20 17:49:21 UTC

[users@httpd] Environment of spawned processes

Hi -  any help/views welcome,

My server starts as root and then switches to user httpd.
I was running my server happily until the machine rebooted itself and of
course Apache also restarted. Normally I make changes to the configuration
and do a -HUP to restart.

It now appears that the shell environment that CGI programs run under is 
very minimal. $PATH for example is the initial system value 
(/usr/sbin:/usr/bin) and does not pick up any additions from /etc/profile,
or ~httpd/.profile.   Is this the norm ?

My once working CGI programs are now failing in all sorts of ways.

-- 

best regards, 

Chris

----------------------------------------------------------------------------
Chris French                                                  The Open Group
Database Administrator                              Apex Plaza, Forbury Road
EMail: c.french@opengroup.org                      Reading, England, RG1 1AX
Tel: +44 118 902 3042                             
Fax: +44 118 950 0110                               http://www.opengroup.org
----------------------------------------------------------------------------
Boundaryless Information Flow: Securing the Extended Enterprise
Hotel Monteleone, New Orleans, LA   -  October 18-22, 2004
http://www.opengroup.org/new-orleans2004/
----------------------------------------------------------------------------
This email and any attachments are confidential to the intended recipient. 
If you are not the intended recipient, please delete it from your system 
and notify the sender. You should not copy it or use it for any purpose, 
nor disclose or distribute its contents to any other person.




---------------------------------------------------------------------
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] Environment of spawned processes

Posted by Joshua Slive <js...@gmail.com>.
On Fri, 20 Aug 2004 16:49:21 +0100 (BST), Chris French
<ch...@opengroup.org> wrote:
> Hi -  any help/views welcome,
> 
> My server starts as root and then switches to user httpd.
> I was running my server happily until the machine rebooted itself and of
> course Apache also restarted. Normally I make changes to the configuration
> and do a -HUP to restart.
> 
> It now appears that the shell environment that CGI programs run under is
> very minimal. $PATH for example is the initial system value
> (/usr/sbin:/usr/bin) and does not pick up any additions from /etc/profile,
> or ~httpd/.profile.   Is this the norm ?
> 
> My once working CGI programs are now failing in all sorts of ways.

See:
http://httpd.apache.org/docs-2.0/env.html

This sounds like you might be using suexec, which cleans the
environment before launching scripts.

Joshua.

---------------------------------------------------------------------
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