start misbehaving deamons as another user than root
Philippe De Swert
philippedeswert at scarlet.be
Thu Jul 12 12:18:07 BST 2007
Thanks for the reply!
> > I wondered if there was a way to get upstart to start daemons with another
> > user than root. This because some daemons don't drop there privileges decently
> > (or as in my case I need the init system to start them up, but I need them to
> > be running with user privileges)
> > I tried the following in the upstart scripts:
> > su -l username -c daemon-command
> su -l username -c exec daemon-command
I tried this, unfortunately upstart complains about an unknown stanza, unless
I put it between *script* and *end script* and then it still fails to work as
it does not spawn the daemon process. (It does not work from the command line
either. I also tried with regular commands like ls and the result is the same.)
Anybody has any other ideas. Of course I can start patching upstart to use
setuid and setgid an then actually launch the application/daemon. Eventually
support for nice can be added too. Is this a good idea?
Scarlet One, ADSL 6 Mbps + Telephone, from EUR 29,95...
More information about the upstart-devel