Ubuntu – How to change the user Transmission runs under

servicestransmissionupstart

I installed Transmission through a PPA and the daemon starts on boot. I want to change the user that runs the daemon because I want the downloaded files to be under the same user as my XBMC installation, and I can't seem to find where to edit that.

The daemon uses upstart so there is nothing about which users runs it in /etc/init.d/transmission-daemon and there isn't anything in /etc/default/transmission-daemon about the user either

I'm using these ppas for transmission:

/etc/apt/sources.list.d/transmissionbt-ppa-quantal.list:deb //ppa.launchpad.net/transmissionbt/ppa/ubuntu quantal main

/etc/apt/sources.list.d/transmissionbt-ppa-quantal.list:deb-src //ppa.launchpad.net/transmissionbt/ppa/ubuntu quantal main

/etc/apt/sources.list.d/transmissionbt-ppa-quantal.list.save:deb //ppa.launchpad.net/transmissionbt/ppa/ubuntu quantal main

/etc/apt/sources.list.d/transmissionbt-ppa-quantal.list.save:deb-src //ppa.launchpad.net/transmissionbt/ppa/ubuntu quantal main

Best Answer

As of upstart v1.4, setuid and setgid are supported natively in config file:

setgid <groupname>

and

setuid <username>

Before v1.4 you can use this (as described here):

exec start-stop-daemon --start -c {user} --exec {command}