On 2005.6.7, at 11:51 PM, Rich Morin wrote:
I've got a Perl CGI script that acts as a "system browser". For example, it can look at files and directories and say interesting things about them. This works fine, as long as the files are world-readable, but fails (because Apache runs as 'www') as soon as the user wanders into "private" areas. One answer to this is to launch a small-footprint web server that runs as the current user. The CGI would run under that server and all would be nifty and cool (well, not really, but OK :-). I'm wondering if I've overlooked a way to get Personal Web Sharing (aka Apache) to handle this for me. Something like "have the user authenticate via https, then launch a given CGI script with that user's uid".
There's an apache module that does exactly that. I think it's called suexec or something like that. But you want to read the documentation carefully, because it has a lot of security issues that you have to understand.
