The target user is dynamic. Therefore I can't chmod it. I could chmod it every time I run the script, but since the script is a CGI, I would run into race conditions. The task would also be much simpler if the target script to be run as another user wasn't the initial script itself. ;)
Comment on Re: Re: Executing a program as another user
take a look at CGIwrap, I think it might fit your needs really nicelly, and would have sugested sooner if I knew you wanted to run the script as a CGI.