in reply to Executing a program as another user

If you're on a unix system, you could log in as the other user once and setuid the script:

chmod 4755 script_name

I recommend reading perlsec (man perlsec) before doing this.

Tiago
  • Comment on Re: Executing a program as another user

Replies are listed 'Best First'.
Re: Re: Executing a program as another user
by nomis80 (Sexton) on Feb 14, 2002 at 04:02 UTC
    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. ;)
      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.

      http://cgiwrap.unixtools.org/

      Good luck,
      Tiago