in reply to Executing a program as another user

if available, you should run setuid processing. perl's even built to handle it... see the special variables
$< (real user id), $> (effective user id), $( (real group id), $) (effective group id)
i've run a lot of scripts under setuid. it's secure, and it works.

~Particle

Replies are listed 'Best First'.
Re: Re: Executing a program as another user
by nomis80 (Sexton) on Feb 14, 2002 at 04:04 UTC
    I can't run setuid as the user as which the script must be run is decided upon dynamically. chmodding every time is impossible since the initial script is a CGI and I would run into race conditions.