On Friday 22 September 2006 18:25, Laurent MARTIN wrote: > First of all this is my very first post on this mailing list. I've > browsed the web but I haven't been able to find the answer I'm > looking for, so... > ...my question: is it possible to run a Perl (5.8.6) CGI using Apache > 2.2.3 w/ mod_perl 2.0.2 and suexec enabled? It seems that the answer > is "no!" w/ mod_perl 1, but what about mod_perl 2?
Still no. > Apache 2 is configured with www/www as "normal" user/group and the > virtualhost in which mod_perl 2.0.2 is enabled is configured (using > suexec) with laurent/laurent as user/group. With these settings, a > simple Perl CGI is not able to create a file in a directory owned by > laurent/laurent but a simple CGI script written in Shell can do it :-/ If you are running perl as a CGI script, it creates a separate process each time, which allows that script to be run as a different user. If you are running mod_perl, the perl interpreter is embedded in the apache process and thus runs as whatever user apache is running as. If you need both mod_perl and your perl to run as different users you'd have to run one instance of apache per user, as that user, and a reverse proxy to farm off the requests to the appropriate server. -- "Program testing can at best show the presence of errors, but never their absence." - Edsger W. Dijkstra