[PATH] -g option for httpd and default user

Rich Felker dalias at aerifal.cx
Tue Oct 3 10:24:04 PDT 2006


On Tue, Oct 03, 2006 at 02:58:02PM +0100, Luciano Miguel Ferreira Rocha wrote:
> > Why they are always called? What if I want to run httpd under
> > current user/group?
> 
> Well, if your current user is root, I doubt it, but you can specify it.
> Defaulting to nobody (er, -1) is better, IMHO.
> 
> If you're not root, the calls will have no effect on the processe's ids.

You'd better check the return values though if you're root, and exit
if they fail. Due to some linux stupidity, setuid can sometimes fail
if you're root under dubious 'security' setups, and it would be very
bad if the httpd maintained root in these situations. IIRC the main
way this can happen is related to "POSIX" capabilities (which have
nothing to do with POSIX, BTW) but there may be other ways.

Rich



More information about the busybox mailing list