Change daemon user

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
werddomain
Posts: 1
Joined: Sun Jan 27, 2019 5:54 am

Re: Change daemon user

Post by werddomain »

renatorattes wrote:After these steps I have a RPC problem:

Code: Select all

Jan 16 18:04:20 raspberrypi systemd[1]: Starting Transmission BitTorrent Daemon...
Jan 16 18:04:20 raspberrypi systemd[1]: Started Transmission BitTorrent Daemon.
Jan 16 18:04:21 raspberrypi transmission-daemon[1415]: [2018-01-16 18:04:21.983] UDP Failed to 
Jan 16 18:04:21 raspberrypi transmission-daemon[1415]: [2018-01-16 18:04:21.984] UDP Failed to 

Code: Select all

403: Forbidden

Unauthorized IP Address.

Either disable the IP address whitelist or add your address to it.

If you're editing settings.json, see the 'rpc-whitelist' and 'rpc-whitelist-enabled' entries.

If you're still using ACLs, use a whitelist instead. See the transmission-daemon manpage for details.
I see my rpc-whitelist but without any changes.

Code: Select all

"rpc-password": "raspberry",
    "rpc-port": 9091,
    "rpc-url": "/transmission/",
    "rpc-username": "pi",
    "rpc-whitelist": "*.*.*.*",
    "rpc-whitelist-enabled": true,
    "scrape-paused-torrents-enabled": true,
    "script-torrent-done-enabled": false,
    "script-torrent-done-filename": "",
    "seed-queue-enabled": false,
    "seed-queue-size": 10,
    "speed-limit-down": 100,
    "speed-limit-down-enabled": false,
    "speed-limit-up": 100,
    "speed-limit-up-enabled": false,
    "start-added-torrents": true,                                          
    "trash-original-torrent-files": false,
    "umask": 2,
    "upload-limit": 100,
    "upload-limit-enabled": 0,
    "upload-slots-per-torrent": 14,
    "utp-enabled": true
}
Can you help me?
I have found the solution :)
The config file path have changed ;)
I have activated debug log on the deamon. Maybe it's why i see this output:

Code: Select all

pi@rasptorrent:~ $ sudo service transmission-daemon status
● transmission-daemon.service - Transmission BitTorrent Daemon
   Loaded: loaded (/lib/systemd/system/transmission-daemon.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-01-27 05:46:58 GMT; 3min 12s ago
 Main PID: 466 (transmission-da)
   Status: "Idle."
   CGroup: /system.slice/transmission-daemon.service
           └─466 /usr/bin/transmission-daemon -f --log-debug --logfile /home/pi/ROOT/Torrents/transmission.log

Jan 27 05:46:59 rasptorrent transmission-daemon[466]: [2019-01-27 05:46:59.364] DHT DHT initialized (tr-dht.c:332)
Jan 27 05:46:59 rasptorrent transmission-daemon[466]: [2019-01-27 05:46:59.364] [b]Using settings from "/home/pi/.config/transmission-daemon" [/b](daemon.c:528)
Jan 27 05:46:59 rasptorrent transmission-daemon[466]: [2019-01-27 05:46:59.364] Saved "/home/pi/.config/transmission-daemon/settings.json" (variant.c:1266)
Jan 27 05:46:59 rasptorrent transmission-daemon[466]: [2019-01-27 05:46:59.364] Port Forwarding (NAT-PMP) initnatpmp succeeded (0) (natpmp.c:70)
Jan 27 05:46:59 rasptorrent transmission-daemon[466]: [2019-01-27 05:46:59.364] Port Forwarding (NAT-PMP) sendpublicaddressrequest succeeded (2) (natpmp.c:70)
Jan 27 05:47:00 rasptorrent transmission-daemon[466]: [2019-01-27 05:47:00.365] Port Forwarding (UPnP) UPNP_GetValidIGD failed (errno 0 - Success) (upnp.c:239)
Jan 27 05:47:00 rasptorrent transmission-daemon[466]: [2019-01-27 05:47:00.365] Port Forwarding (UPnP) If your router supports UPnP, please make sure UPnP is enabled! (upnp.c:242)
Jan 27 05:47:00 rasptorrent transmission-daemon[466]: [2019-01-27 05:47:00.365] Port Forwarding State changed from "Not forwarded" to "Starting" (port-forwarding.c:92)
Jan 27 05:47:06 rasptorrent transmission-daemon[466]: [2019-01-27 05:47:06.364] Port Forwarding (NAT-PMP) readnatpmpresponseorretry failed. Natpmp returned -7 (the gateway does not support
Jan 27 05:47:06 rasptorrent transmission-daemon[466]: [2019-01-27 05:47:06.364] Port Forwarding State changed from "Starting" to "???" (port-forwarding.c:92)
lines 1-18/18 (END)
You just need to update the new file ;-)
ps: my user is pi
ipedro
Posts: 1
Joined: Fri Feb 15, 2019 2:02 pm

Re: Change daemon user

Post by ipedro »

ok, how do i update?
killemov
Posts: 447
Joined: Sat Jul 31, 2010 5:04 pm

Re: Change daemon user

Post by killemov »

Apparently the TS somehow forced transmission-daemon to run as user pi, which is weird and should not be done. This lead to the creation of a, quite useless, blank/vanilla "/home/pi/.config/transmission-daemon/settings.json". When you install transmission-daemon on Raspbian a specific user "debian-transmission" is created to run transmission-daemon. This username is used in the systemd configuration file "/lib/systemd/system/transmission-daemon.service".

Code: Select all

[Service]
User=debian-transmission
Nitrock28
Posts: 1
Joined: Mon Dec 16, 2019 10:11 pm

Re: Change daemon user

Post by Nitrock28 »

Thanks for those instructions, they worked but I had the same RPC problem as mentioned above, what then needs to be done is to FIRST stop the daemon (Transmission-daemon will overwrite the changes as it stops) :

Code: Select all

sudo service transmission-daemon stop
edit the file

Code: Select all

/home/*USER*/.config/transmission-daemon/settings.json
with the correct settings and whitelists
or copy it from it's original location if you already edited it :

Code: Select all

cp /etc/transmission-daemon/settings.json /home/*USER*/.config/transmission-daemon/
and restart the daemon :

Code: Select all

sudo service transmission-daemon restart
The UDP error persists but the program should work
chandkumar3g
Posts: 1
Joined: Sat Jan 23, 2021 1:02 pm

Re: Change daemon user

Post by chandkumar3g »

I am really getting tired with this, every couple of months, version change, nothing works and we need to dig into all these things that I care not to memorize and have to dig the forums every time...
Post Reply