-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I would like to have daemon running as root supervise a non-privileged process (running as nobody).
I am running "daemon" like this:
daemon --name=myprogram \
--respawn --attempts=1 --delay=10 \
--user=nobody \
--stderr=/var/log/daemon/myprogram.process.log \
--errlog=/var/log/daemon/myprogram.daemon-supervisor.log \
--command='/home/user/bin/myprogram'
This plan has the following security niceties:
nobodyby default has no shell, and I don't have to give one to it.nobodyby default cannot write into either/var/log/daemon/myprogram.process.logor/var/log/daemon/myprogram.daemon-supervisor.log, it is "really unpivileged".daemonwhen run asrootcannot be killed or otherwise damaged by someone who intrudes into the system and hijacks access tonobodyvia, say, a vulnerability inmyprogram.
Since daemon run as root can do [2], and by default has a shell, it can open writing to the desired file before dropping privileges.
However, since version "0.3 (20000902)", daemon is dropping root privileges very early, so doesn't allow the setup of [1], [2], [3].
Would it be possible to add an option to drop privileges later?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels