no setuid for CGI scripts?

Leeuw van der, Tim tim.leeuwvander at nl.unisys.com
Mon Nov 5 16:58:15 EST 2001


SETUID - scripts are usually disallowed for security - reasons. If there's a
script, be it python, perl, shell or whatever, that can be run setuid, the
interpreter can generally be coaxed into running arbitrary code. Not
something you want. Therefore, a lot of unices disallow it.
I believe that there is a special setuid - perl.

Do you really *need* setuid? Is there no other way to achieve what you need
to do?

--Tim

-----Original Message-----
From: NOSpawnPAM at lightspawn.org [mailto:NOSpawnPAM at lightspawn.org]
Sent: maandag 5 november 2001 12:49
To: python-list at python.org
Subject: no setuid for CGI scripts?


I'm trying to convert a few simple CGI scripts from Perl to Python,
and was shocked to learn that the Python interpreter silently ignores
the setuid bit.

I really don't know how to get around this. Since the server is hosted
remotely I can't recompile python to allow setuid, and I can't make my
files world read/writable - I need my python CGIs to run with MY uid.

I read somewhere about using a wrapper C program but it seems really
convoluted, as well as requiring a different wrapper for each CGI.

Is there any solution, or should I stick to / am I stuck with Perl?
-- 
http://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list