Changing user for Transmission on FreeNAS 9.2.1.8

Status
Not open for further replies.

tortib

Cadet
Joined
Nov 4, 2014
Messages
6
Hello everyone.

I found a forum post stating that in order to change the user for Transmission or any other daemon you must edit /etc/rc.conf.local and add the following `transmission_user="media"` or whichever user you want it to run as. I would like to have transmission run as the media user. When I add the line to /etc/rc.conf.local within the jail it causes the plugin not to start any longer. Also I've tried editing /etc/rc.conf within the jail and adding the line in there but it gets deleted (or overwritten with default rc.conf) I have also tried to edit the /usr/pbi/transmission-amd64/etc/rc.conf file within the jail but that also gets overwritten with the default settings whenever I start the plugin from the FreeNAS plugins manager. I'm really at a loss as to how to get transmission to run as a different user. If someone could please assist me I would greatly appreciate it.

Thank you.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
why do you want it to run as a different user? It probably wont run if you do that because it needs to open certain files on the filesystem which require root.
 

tortib

Cadet
Joined
Nov 4, 2014
Messages
6
Because I need the media group to own the files that transmission creates so headphones and sabnzbd will be able to read & write to the dirs. The transmission daemon is currently running as the transmission user so I doubt it requires root.
 
Last edited:

tortib

Cadet
Joined
Nov 4, 2014
Messages
6
I'm just going to create a port jail and install transmission that way.
I hope this mild information was helpful to someone.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
That won't change anything.

What user owns the file now and what is the group of the file after downloaded by transmission?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
I think what you want to do is create the same group in all the jails with the same gid and also create that group in freenas then you want to add each of the users that touch the files for each of your services to that group. So the transmission user would be in the media group and the sickbeard user would be in the media group in its jail. Then also make sure your permissions for those files is 775 or use a umask in each jail to do that for you.
 

tortib

Cadet
Joined
Nov 4, 2014
Messages
6
I tried doing that before I posted on the forum. It doesn't seem to work. The umask is set to 002 and when I create a file with `touch /Downloads/test` from within the jail it uses the proper umask, the permissions are 775. However, when the transmission creates a dir of file the permissions are set to 755.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
How did you set it? Umask is a per shell variable so it needs to be set in something that gets loaded on ever new shell instance.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421

tortib

Cadet
Joined
Nov 4, 2014
Messages
6
Looks like that did the trick, I add the transmission group to the media group within the jail and then set the umask to '2' in the transmission configuration file (it uses base10 that's why the umask is different from POSIX). Thank you for the assistance and I hope this information helps others.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I bet you transmission wasn't starting because the 'media' user didn't exist in your transmission jail. or you didn't change the ownership to transmissions data directory to the 'media' user.

finally if anyone decides to create matching users in different jails they need to also have matching UID's
 
Status
Not open for further replies.
Top