SuSE Linux, python and setgid

Thomas Wouters thomas at xs4all.nl
Mon Jun 26 07:09:04 EDT 2000


On Mon, 26 Jun 2000 10:04:01 +0200, Thomas Leonhardt
<leonhardt at informatik.tu-darmstadt.de> wrote:
>I have got the problem that I should install a script on our server
>which was written in python. The problem is that the script checks
>wether the group id was set as specified by the file permissions.

>But somehow the gid is not set when I execute the script. Is there
>something like suidperl for python or smoethingelse special with
>SuSE linux which causes the gid not beeing set??

It isn't SuSE specific, nor Python specific: scripts (interpreted files)
can't be setuid or setgid, under most UNIX systems, for reasons of security.
You'll have to create a wrapper (in C or another non-interpreted language)
that takes the proper gid, and then executes the python interpreter for you.
Take a look at Misc/setuid-prog.c, in the Python source tree.

Secure-ly y'rs,
	Thomas.




More information about the Python-list mailing list