Starting as Root

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
Soapm
Posts: 81
Joined: Sat Mar 31, 2012 8:01 pm

Starting as Root

Post by Soapm »

I'm at my wits end, I can't figure out why transmission keeps starting as "root" instead of the username "transmission".

Here are all the config files I can think of:

Code: Select all

-----
/etc/init.d/transmission-daemon

### END INIT INFO

NAME=transmission-daemon
DAEMON=/usr/bin/$NAME
USER=transmission
STOP_TIMEOUT=30

Code: Select all

-----
/etc/default/transmission-daemon

# Change to 0 to disable daemon
ENABLE_DAEMON=1

# This directory stores some runtime information, like torrent files
# and links to the config file, which itself can be found in
# /etc/transmission-daemon/settings.json
CONFIG_DIR="/home/transmission/.config/transmission-daemon/"

# Default options for daemon, see transmission-daemon(1) for more options
OPTIONS="--config-dir $CONFIG_DIR"

Code: Select all

----
/etc/init/transmission-daemon.conf

setuid transmission
setgid transmission
-

Code: Select all

----
/etc/systemd/system/multi-user.target.wants/transmission-daemon.service

Description=Transmission BitTorrent Daemon

Wants=network-online.target
After=network-online.target

[Service]
User=transmission
Group=transmission
Type=notify
ExecStart=/usr/bin/transmission-daemon -f --log-error
ExecStop=/bin/kill -s STOP $MAINPID
ExecReload=/bin/kill -s HUP $MAINPID
-----

Yet, I see this in the logs after it starts, "/root/.config/transmission-daemon/settings.json"

What am I missing to get it to start as "transmission" and not as "root"?
Last edited by Soapm on Sun Jan 23, 2022 3:44 am, edited 1 time in total.
Soapm
Posts: 81
Joined: Sat Mar 31, 2012 8:01 pm

Re: Starting as Root

Post by Soapm »

Got another clue... I changed my daemon file to;

Code: Select all

ExecStart=/usr/bin/transmission-daemon -f --log-debug --logfile /var/log/transmission.log
And I got;

Code: Select all

[2022-01-22 20:37:01.045] LPD Local Peer Discovery initialised (tr-lpd.c:409)
[2022-01-22 20:37:01.045] Using settings from "/home/transmission/.config/transmission-daemon" (
[2022-01-22 20:37:01.045] Saved "/home/transmission/.config/transmission-daemon/settings.json" (
[2022-01-22 20:37:01.045] transmission-daemon requiring authentication (daemon.c:674)
But when I change the logging back from "debug" to "error" it goes back to using the root file???
Soapm
Posts: 81
Joined: Sat Mar 31, 2012 8:01 pm

Re: Starting as Root

Post by Soapm »

Anyone ever see this command?

Code: Select all

transmission-daemon -g /home/transmission/.config/transmission-daemon
Found it in this thread viewtopic.php?t=11099 by rb07 and it fixed my config problem.

I have no idea what change it made or why I couldn't make that change before now???
Post Reply