Change user of transmission-daemon under Debian and Raspbian

UPDATE: Cristian commented adding a nice solution (which I didn’t personally test though, so it’s on you):

  1.  run chmod 775 on the download folder, with -R option (recursive on subfolders):
    sudo chmod -R ug+rw folderName
  2.  add your own user (the one you need to be able to access the downloaded files) to debian-transmission group, or any other group that the transmission daemon belongs to:
    sudo usermod -a -G groupName userName

And that would be all.

Though, after some tinkering that occurred as of june 2019, I found that my original, following, solution has a -probably- nicer “feature” for someone: the config folder of transmission is saved in your own home under the .config/transmission-daemon/ folder, instead of /var/lib/transmission-daemon/, in my case this saved some waste of time because I had the home folder backed up, while the rest of the system was installed from scratch.

This is the original article with the original solution.

I have a raspi3 running transmission daemon downloading to an external USB drive shared via Samba. I don’t want to keep using debian-transmission user with the daemon since just switching to my user account having the access rights to the external USB is much simpler.

I had it already nice and running before, but updating the daemon with apt-get messed everything (and lost all the running torrents as well) so I had to rediscover the procedure once again, and for posterity (and myself for future occasions) I’m writing it down here.

All the missing torrents appeared again after I solved the issue.

Periodically I myself come back here, since at every update of transmission, the service username is restored to the default value, and my Web UI doesn’t work anymore. That’s my cue to open my own tutorial and follow it.

So, here are the things you need to do:

  1. run sudo service transmission-daemon stop just in case
  2. edit /etc/init.d/transmission-daemon to have USER=username
  3. edit /lib/systemd/system/transmission-daemon.service to the same effect
  4. run sudo chown -R user:user /etc/transmission-daemon/
  5. run sudo chown -R user:user /var/lib/transmission-daemon/
  6. restart the service with sudo service transmission-daemon start

Done.

According to a comment of this article, this might not work for you, so instead you might want to follow this guide instead:

https://askubuntu.com/questions/261252/how-do-i-change-the-user-transmission-runs-under/544185#544185

5 thoughts on “Change user of transmission-daemon under Debian and Raspbian”

  1. Hi, reading this guide (and applying it) I just found that.The message about the permissions that the web interface shows is a matter of user and file management (a linux thing)

    So the only thing is needed is:

    1.- See that the download folder has group permissions (chmod 775)
    2.- Add the user to the group that the files belongs
    (https://askubuntu.com/questions/79565/how-to-add-existing-user-to-an-existing-group)

    There’s no need to change anything from the debian app. (worked for me)

    Cheers!

Leave a Reply to Cristian rodriguez Cancel reply

Your email address will not be published. Required fields are marked *