One reason is to write its pid file, normally into /var/run/gmetad.pid, which usually only root can do. As far as I know, this is how most daemons operate. Initially start as root, do a few things like write the pid file and like you mentioned, bind to privileged ports if necessary, then drop privileges.
~Jason On Wed, 2008-08-13 at 20:34 +0100, Kostas Georgiou wrote: > Hi, > > I just noticed that the default init scripts start gmetad as root and it > then does a setuid to nobody. Is there a reason why gmetad needs extra > priviliges? It doesn't need to bind privileged ports or anything else > that requires root privileges as far as I can tell so a > daemon --user nobody $GMETAD > should be enough. > > Kostas > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Ganglia-developers mailing list > Ganglia-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ganglia-developers > -- /------------------------------------------------------------------\ | Jason A. Smith Email: [EMAIL PROTECTED] | | Atlas Computing Facility, Bldg. 510M Phone: +1-631-344-4226 | | Brookhaven National Lab, P.O. Box 5000 Fax: +1-631-344-7616 | | Upton, NY 11973-5000, U.S.A. | \------------------------------------------------------------------/ ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ganglia-developers mailing list Ganglia-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-developers