in reply to Re: changing uid/gid in suid cgi script
in thread changing uid/gid in suid cgi script

> Many nixes will not run an interpreter script suid root.

I had this problem with Compaq Tru64 UNIX, the fix I used was a small bit of C code (yes I know it isn't Perl :-) as follows:

#include <unistd.h> int main (int argc, char *argv[]) { execl("/path/to/yourscript.pl", "yourscript.pl", NULL); }
Save this as 'wrapper.c' and compile it with
cc -o wrapper wrapper.c
Set the permissions of 'wrapper' so it runs SUID root, then the EUID and EGID variables in your Perl script will be correctly set.

As Zaxo said, this is dangerous, but if you really want to...

(Code taken from the book 'Professional Apache' published by Wrox)

Regards,

JJ