net-p2p/deluge-1.3.3 and likely earlier versions fail to respect the DELUGED_USER variable set in /etc/conf.d/deluged. The daemon is started as root instead: PID USER CPU% MEM% TIME+ Command 1 root 0.0 0.0 1:57.60 init [3] 27631 root 3.0 14.7 14:24.93 `- /usr/bin/python2.7 /usr/bin/deluged --do-not-daemonize 28145 root 0.0 14.7 0:00.28 | `- /usr/bin/python2.7 /usr/bin/deluged --do-not-daemonize 28142 root 0.0 14.7 0:41.60 | `- /usr/bin/python2.7 /usr/bin/deluged --do-not-daemonize 28141 root 1.0 14.7 4:03.34 | `- /usr/bin/python2.7 /usr/bin/deluged --do-not-daemonize 28140 root 0.0 14.7 0:38.03 | `- /usr/bin/python2.7 /usr/bin/deluged --do-not-daemonize This poses a security risk and makes it difficult to set security limits on system resources for the service.
Created attachment 286671 [details] Patched /etc/init.d/deluged file Just change "-u" to "--chuid" in start-stop-daemon lines.
Fixed, thanks
Wait a second...i moved from --chuid to --user weeks ago because --chuid is deprecated... I'll have a look at this...
Works fine for me, please try to debug it more...
(In reply to comment #3) > Wait a second...i moved from --chuid to --user weeks ago because --chuid is > deprecated... I'm guessing that --chuid was deprecated in some version of baselayout. However, I'm still running baselayout-1.12.14-r1 because the upgrade path would probably require a restart. It seems newer versions of Deluge should have had DEPENDed on newer versions of baselayout regardless whether they are in portage or not. You might probably mark this as RESOLVED INVALID, but I'm just going to ask just in case other people experience similar issues: An unsupported workaround would be to add --chuid to the init-script for start-stop-daemon invocations starting the deluge core and GUI?
An option could be to have two init scripts...if i have the time i'll have a look
Older versions of baselayout are not in tree anymore. Current init file works as advertised. Please reopen if you experience other issues.