On Mon, 6 Jan 2003 02:03:05 -0500, you wrote:

>Is it posible to change the current uid/gid in a script that is being running
>? of course, having the user and password ? like running su.

I don't believe that it's possible to do this inside PHP.  I would
suggest writing a seperate script to do all of the stuff that requires
a different UID/GID.  As you said, you could write a bash script, or
you could use Perl, or even a PHP CLI-mode script.  You could then
make the script executable, change the owner of the script to the
desired user and set the setuid and setgid bits, and then call this
from your PHP page using system() or exec().  I've done this on a few
occasions and it works well...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to