transmission-daemon ignoring settings.json
Solution 1
After updating 16.04 LTS, systemd would not load my config file for transmission-daemon from the correct location.
I found a workaround at: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734467
I tried the drop-in *.conf file in /etc/systemd/system/transmission.service.d/ to override ExecStart. However, using ps -ef | grep transmission I could see the wrong config location was still being used after reloads and restarts.
Reluctantly, I edited
/lib/systemd/system/transmission-daemon.service
to include the correct path by appending
-g /etc/transmission-daemon
to the ExecStart line.
[Unit]
Description=Transmission BitTorrent Daemon
After=network.target
[Service]
User=debian-transmission
Type=notify
ExecStart=/usr/bin/transmission-daemon -f --log-error -g /etc/transmission-daemon
ExecReload=/bin/kill -s HUP $MAINPID
[Install]
WantedBy=multi-user.target
Solution 2
I had the same problem just now; transmission-daemon.service
decided to ignore my rpc-whitelist
for whatever reason after I changed the user of the daemon. Jim Ladd's answer above is somewhat on the right track but editing systemd config files under /lib/systemd
is a really bad idea because those edits wouldn't survive package upgrades. The correct way to edit a systemd config is to use systemd edit foo.service
(which creates an override file in /etc/systemd/system/foo.service.d
that works in conjunction with the existing config) or systemd edit --full foo.service
(which creates /etc/systemd/system/foo.service
that completely replaces the /lib/systemd/
version). To replace the ExecStart
line, your override file should look like this:
# /etc/systemd/system/transmission-daemon.service.d/override.conf
[Service]
ExecStart= # Clear existing ExecStart
ExecStart=/usr/bin/transmission-daemon -f --log-error -g /etc/transmission-daemon
Note however that overriding ExecStart
isn't even necessary. transmission-daemon
recognizes the TRANSMISSION_HOME
env var, which works the same as -g, --config-dir
. So, an easier override:
# A simpler and more robust /etc/systemd/system/transmission-daemon.service.d/override.conf
[Service]
Environment=TRANSMISSION_HOME=/etc/transmission-daemon
Solution 3
I had the same issue after upgrading from 16.04 to 18.04. @JimLadd's answer worked for me but I just wanted to add that you need to restart the daemon after editing the file using:
systemctl daemon-reload
Solution 4
This worked for me after latest apt update losing location of config file with:
Description: Ubuntu Jammy Jellyfish (development branch)
Release: 22.04
Instructions from this site:
Install Transmission Bittorrent Client on Ubuntu 15.x
Modify the transmission systemd script variables to use the right settings.json file (updated and fixed)
sudo mkdir -p /etc/systemd/system/transmission-daemon.service.d
sudo nano /etc/systemd/system/transmission-daemon.service.d/local.conf
Add these lines to /etc/systemd/system/transmission-daemon.service.d/local.conf:
[Service]
ExecStart=
ExecStart=/usr/bin/transmission-daemon -f --log-error -g /etc/transmission-daemon
Ctrl+X, Y and Enter to Save
thanks to Alessandro for the suggestion.
Related videos on Youtube
Justin Kaeser
Updated on September 18, 2022Comments
-
Justin Kaeser over 1 year
Since I upgraded my ubuntu server installation from 16.04 to 16.10, the transmission-daemon service seems to be ignoring
settings.json
.The symptom is that the web interface gives me:
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.
but in
/etc/transmission-daemon/settings.json
we have, unchanged from before the upgrade:"rpc-whitelist": "127.0.0.1,192.168.23.*", "rpc-whitelist-enabled": true,
/var/lib/transmission-daemon/.config/transmission-daemon/settings.json
also points to/etc/transmission-daemon/settings.json
:jast@achilles:/etc/transmission-daemon$ sudo ls -l /var/lib/transmission-daemon/.config/transmission-daemon/ lrwxrwxrwx 1 root root 38 Sep 5 12:56 settings.json -> /etc/transmission-daemon/settings.json
syslog after doing
service transmission-daemon restart
(I think it should usually be also tellung me what ips it adds to the whitelist:Jan 7 13:16:37 achilles transmission-daemon[4087]: Closing transmission session... done. Jan 7 13:16:38 achilles transmission-daemon[5025]: [2017-01-07 13:16:38.552] UDP Failed to set receive buffer: requested 4194304, got 425984 (tr-udp.c:84) Jan 7 13:16:38 achilles transmission-daemon[5025]: [2017-01-07 13:16:38.552] UDP Failed to set send buffer: requested 1048576, got 425984 (tr-udp.c:95) Jan 7 13:16:38 achilles transmission-daemon[5025]: [2017-01-07 13:16:38.552] UDP Failed to set receive buffer: requested 4194304, got 425984 (tr-udp.c:84) Jan 7 13:16:38 achilles transmission-daemon[5025]: [2017-01-07 13:16:38.552] UDP Failed to set send buffer: requested 1048576, got 425984 (tr-udp.c:95)
So where is it trying to get its config from now?
-
Phillip -Zyan K Lee- Stockmann about 7 yearscan you - for future reference in case the cited source is changed/removed - please add a relevant excerpt from your link?
-
4ae1e1 about 5 yearsThis is on the right track but an unsustainable overkill. See my answer at askubuntu.com/a/1138789/151158 for a simpler and idiomatic approach.
-
miceagol over 4 yearsThis should be the accepted answer! I also had to add a line defining the user in override.conf, since I'm running Transmission using a different user than standard: User=username.
-
FredericB over 2 yearsThe problem stills happening on transmission-daemon/stable,stable 2.94-2+deb10u2 amd64 (debian 10) but your solution too :)
-
David about 2 yearsHello. Since Ubuntu 22.04 does not exist yet this can not be an answer. Sorry.
-
Mike Latta about 2 yearsUbuntu 22.04 LTS Jammy Jellyfish will be released on April 21, 2022. I'm currently running the development branch as I stated in my post. I'm not having any issues with running the latest version of TransmissionBT after following the instructions I found and noted. in my post.