I have a question about Apache server. The scenario is following: I start Apache server to run a website, which need to log in. A user named Ray log on this website, then the server will run by Ray. (I am also running, maybe this is a sub-process). Is there anyone knows how to implement this scenario? Thanks in advance.

The trivial things maybe the port number, and how to write the httpd.conf file in USER GROUP.. (just guess)

link|improve this question
R U sure? what's the use case? file access? – yi_H Aug 2 '11 at 18:54
That's an epic security violation. There's no earthly way this should be allowed. Ray can just as well be 'root'. What then? – S.Lott Aug 2 '11 at 18:55
Im not clear about the use case. I just want to whether this scenario can be implemented. – thinkman Aug 2 '11 at 19:02
feedback

migrated from stackoverflow.com Aug 3 '11 at 9:00

This question came from our site for professional and enthusiast programmers.

1 Answer

Apache can run CGI programs as a different user through mod_suexec: http://httpd.apache.org/docs/2.0/mod/mod_suexec.html

This does require that the logged-in user has a unix account on the machine, and it also requires you to implement some kind of premissions scheme that allows only Ray to access Ray's cgi directory (which can be done with standard apache .htaccess Allow/Deny controls)

link|improve this answer
Thanks a lot. Im looking at that. – thinkman Aug 2 '11 at 19:07
feedback

Your Answer

 
or
required, but never shown