posix_setuid doesnt work

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


I've got problem with posix_setuid().
I've compiled php with --enable-posix.
Everythin like posix_getpwuid() works fine
except posix_setuid and posix_setgid.
php 4+mysql 4+apache 1.3.31.
System - FreeBSD 5.3

Best regards,


Re: posix_setuid doesnt work

Quoted text here. Click to load it

How do you know it doesn't work?

The (PHP) description of that function on php.net (and the POSIX
description of the corresponding C function) say you have to be
running as root to usefully use that function.  Are you?

                    Gordon L. Burditt

Re: posix_setuid doesnt work

Shamrock wrote:
Quoted text here. Click to load it

Do you have the setuid and setgid bits turn on for the PHP executable
(not the script)?

Beware one thing - this is a HUGE security hole. You should NEVER run
ANYTHING under Apache (or any other server) with these bits on!


To reply, delete the 'x' from my email
Jerry Stuckle,
JDS Computer Training Corp.
Member of Independent Computer Consultants Association - www.icca.org

Site Timeline