Re: ownership of cgi program relevant?

Stanley Gambarin (gambarin@OpenMarket.com)
Wed, 05 Feb 1997 11:30:05 -0500

Message-Id: <199702051630.LAA28729@u4-138.openmarket.com>
To: Michael Smith <mjs@cursci.co.uk>
Subject: Re: ownership of cgi program relevant? 
In-Reply-To: Your message of "Tue, 04 Feb 1997 17:13:53 GMT."
             <32F76E51.4F7F5297@cursci.co.uk> 
Date: Wed, 05 Feb 1997 11:30:05 -0500
From: Stanley Gambarin <gambarin@OpenMarket.com>

> I'm using apache_1.2b4 on SGI, and mod_fastcgi 1.4.3.  I'm wondering if
> the cgi program needs to be owned by the user the web server is running
> as.  I'm getting the error
> 
> apollo% ./run.sh
> Syntax error on line 111 of /httpd/conf/httpd.conf:
> AppClass: Could not access file /httpd/cgi-bin/fast.fpl
> 
> when I attempt to run the web server as a different user.  This user has
> no problems running the program on the command line.  fast.fpl has
> permissions -rwxr-xr-x.
> 
	In general, a fastcgi program must be executable by the user that
the web server runs as.  The access permissions are based on the effective
user and group ids and are checked at runtime.  In addition, any directories
that lead to the fastcgi application must be accessable by the effective
uid.  (By accessable, I mean that you are allowed to search and read through
those directories, usually translating into r-x permissions).
	A couple of guesses as to what may be wrong with your setup above:
you specified /httpd/cgi-bin/fast.fpl as the location of executable.  If the
path above is relative to ServerRoot, then it will not work, since fastcgi
does chdir(), which changes the current directory and so it will not be able
to find the app (solution is to specify the full-path to the executable).
	Directory /httpd or /httpd/cgi-bin are not readable and/or 
executable by the user.  Finally, it could be that server changes the 
effective uid, which results in different permissions.
	Hopefully, one of those should fix your setup.   If not, I would 
appreciate a more detailed report with excerpts from the configuration
file, describing User directive, as well as AppClass directives.
						Hope that was of some help.
								Stanley.
-- 
*******************************************************************************
* To unsubscribe from the fastcgi-developers mailing list		      *
* 		mailto: fastcgi-developers-request@openmarket.com      	      *
*		with body containing: unsubscribe       		      *
* To request help for using the fastcgi-developers mailing list		      *
* 		mailto: fastcgi-developers-request@openmarket.com      	      *
*		with body containing: help		       		      *
*******************************************************************************

*******************************************************************************
* Stanley Gambarin			Open Market Inc.		      *
* FastCGI (soon-to-be) Guru		245 First St. Cambridge MA 02142      *
*					(617) - 949 - 7487		      *
* mailto:gambarin@openmarket.com					      *
* 				http://acs2.bu.edu:8001/~stanleyg (school)    *
*				mailto:stanleyg@cs.bu.edu		      *
*******************************************************************************