6/11 I've got apache running as user 'nobody', but I'm writing some DB
access CGI's, that need to execute under a different user ID. Is
there any way of doing this short of running a second httpd on a
different port, the second instance of httpd running as the db
access user?
\_ compile apache with suexec, and put the database CGI's in
~database/public_html. And you really should be running
apache as something other than "nobody". -tom
\_ setuid bits might work. Most OS's will allow suid to do what you
want.
\_ No, some OS's won't let you run scripts suid.
\_ Already tried it... doesn't work (at least, not under apache
1.3.6) -- even setuid'ing the executable as the DBA
user, when the CGI is executed, it still runs as user
'nobody' (which is what I have httpd running as).
\_ Why did someone delete the correct response? Apache has a
mechanism for doing this--compile it with suexec, and put the
script in a user public_html directory. And you shouldn't
be running apache as "nobody". -tom |