Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)

share|improve this question
    
R U sure? what's the use case? file access? –  Karoly Horvath 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
add comment

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)

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.