configuring mxCGIPython

M.-A. Lemburg mal at lemburg.com
Thu Apr 25 07:01:00 EDT 2002


Paul Boddie wrote:
> 
> "Mark McEahern" <mark at mceahern.com> wrote in message news:<mailman.1019680127.28712.python-list at python.org>...
> > Hi, I'm trying to configure mxCGIPython:
> >
> >   http://www.egenix.com/files/python/mxCGIPython.html#Install
> >
> > I'm stuck at step 4, chmod 755 the path to the binary file cgipython.
> 
> [...]
> 
> > If I ftp to the server, I can chmod 755 the specific file.  If I change the
> > script just to reference the filename (not the full path), it works.
> 
> With the ability to perform a chmod using FTP, I don't see the reason
> for using the "install script" provided for mxCGIPython.

Note that in order for the web server to execute the cgipython
binary, the web server user must be able to cd to the directory
where the binary lives.

Depending on where you install the binary, this may not be the
possible. The only way around this is either finding a directory
which the web server user account can read or to install cgipython
in a sub-dir of cgi-bin/ which is protected against access through the
web server using e.g. an .htaccess file (depends on the web server
being used).

> > The problem is that the shebang line for the Python cgi files needs to have
> > the full path, I think.  If I don't chmod the full path, it doesn't work.
> > The full path would be:
> >
> >   #!/home/chain/pythons/cgipython
> 
> I found that it isn't always possible to deploy Python programs in a
> cgi-bin directory and to use the above notation to persuade the
> operating system to locate the Python executable. In the end, I used a
> wrapper shell script for each of my Python programs.

This should not be necessary if the directory permission
are right... but I may be wrong.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting:                           http://www.egenix.com/
Python Software:                   http://www.egenix.com/files/python/





More information about the Python-list mailing list