start misbehaving deamons as another user than root

Philippe De Swert philippedeswert at scarlet.be
Wed Jul 11 15:13:07 BST 2007


Hi all.

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

However this causes the following issues. Two processes are spawned. One being
a different shell and the daemon-command seperatly.
Also this creates difficulties for the respawning. If the daemon gets killed
there is no problem as the shell terminates too. However if the shell gets
killed the daemon does not exit and upstart spawns a new shell and a new daemon.

Anybody that has an idea?

Thanks,

Philippe
---
Scarlet One, ADSL 6 Mbps + Telephone, from EUR 29,95...
http://www.scarlet.be/




More information about the upstart-devel mailing list