Apache, CGI, Python...

Thomas Wouters thomas at xs4all.net
Thu Jul 12 11:38:33 CEST 2001


On Wed, Jul 11, 2001 at 09:38:41PM +0000, Bengt Richter wrote:

> Can a python script be run efficiently and su-exec'd? I.e, Apache can run
> CGI as a particular account owner (e.g.,for access to private directories
> etc. that 'nobody' shouldn't see). Naturally it would work if you got a
> whole instance of the interpreter to yourself, but does modPython take
> care of su-exec properly? (I guess I should ask at modpython, but I'm here
> ;-)

No, just like mod_perl and mod_php, mod_snake and mod_python both embed
Python into Apache, and so it runs under the permissions of the Apache
server, not as a separate user like 'suexec'.

But note that you don't need mod_python or mod_snake to run Python scripts
at all. They're just handy speedups and provide hooks into Apache,
and some forms of persistance and such.

If you want to have fast CGI's, persistance *and* run them as another user,
you should consider FastCGI instead.

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list