I'm Sorry...Yet Another Transmission Thread

Status
Not open for further replies.

Digitaldreams

Explorer
Joined
Mar 7, 2017
Messages
80
I hate to create yet another topic on transmission but I have spent literally 2 days (16 hours) looking for a basic guide that will show me some initial steps on doing a clean install, using the CLI, of transmission daemon in a jail without using the plugin. Since I'm a Linux novice, I'm struggling with some of this. I'm also still trying to find the best method of approach when it comes to storage and directories. I'm pulling my hair out at this point. Here is what I'm thinking and I would greatly, greatly, greatly appreciate advice and guidance. I'm running FreeNAS-9.10.2-U2.


1) I'm going to create a new dataset called "bittorrent" under tank/bittorrent. I plan on trying to just use the transmission web interface from my windows machine to upload and download torrents and files from but I'm NOT planning on using SMB to map the drive. Should the dataset share be Unix or Windows for this case? I intend to have a script or something where the completed files can be automatically moved to another win share that I currently use. My setup is like this. I currently have an SMB share mapped to my Win laptop which is also shared and mounted to my plex jail. So right now, I'm downloading torrents on my laptop straight to the windows mapped drive which is shared with plex. Is there a better solution?


2) From what I read, I need to create 3 directories something like torrents, completed and downloading which I will do as subdirectories under tank/bittorrent. Do I create the sub-directories in the freenas local then mount them to the transmission jail using the FreeNAS jail-storage tab within the GUI or do I create them from within the jail using the CLI? Through all of the guides I have read, they have seriously confused me on this. How should I be approaching this?


3) I will set the permissions on the bittorrent dataset to owner "Pierre" and Group "users" (which I am already using for the plex/SMB share dataset) instead of root and wheel. In doing this, I understand that I need to use "Pierre" as the user in transmission in order to access the web GUI. Is this a correct assumption and if so, how do I configure that? I'm not quite clear on this because I have looked for the settings and conf files and JSON's but they were never where the guides said they were.

4) From what I understand of transmission, I need to install 3 components; transmission-2.84, transmission-daemon-2.92_3 and transmission-web-2.92. Is this correct?


I'll leave it at that for now and if I get that far will be very happy.
 

Digitaldreams

Explorer
Joined
Mar 7, 2017
Messages
80
Eh not really... I still haven't found a clean guide that uses the CLI method. As for the rest I'm just working my way through it still.

Sent from my Pixel XL using Tapatalk
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
1) Unix will work. Windows may work, but I do not have any experience with it.

In my opinion, yes, there are better solutions that what you currently have and what you propose.
I prefer solutions that completely automate the process without needing your own scripts but instead relying on open source projects.
I personally use sickrage and couchpotato to automate downloands on sabnzbd and transmission. these are renamed/moved using the nzbToMedia scripts.

2) either will work. I suggest you minimize the amount of mountpoints, and have a single dataset mounted from your freenas host. in there you can create folders for transmissions download folder(s)
here's my setup, sickrage and couchpotato have completed downloads go into category sub-directories. I also define an incomplete download directory to keep things more organized
/mnt/tank/media > /mnt/media (in the jail)
/mnt/media/downloads/transmission/
/mnt/media/downloads/transmission/incomplete
/mnt/media/downloads/transmission/complete
/mnt/media/downloads/transmission/complete/tv
/mnt/media/downloads/transmission/complete/movie

3) you do not need any specific permissions to "access the web GUI", but whatever user transmission runs as needs to have permissions to write files where you set the download directory to.
changing transmission user is a good solution and is what I do. follow "Solution 2" here
https://forums.freenas.org/index.ph...plugins-write-permissions-to-your-data.27273/

4) if you run 'pkg install transmission-daemon' it will download the dependencies you need, including the other packages you mentioned.
 

Digitaldreams

Explorer
Joined
Mar 7, 2017
Messages
80
1) Unix will work. Windows may work, but I do not have any experience with it.

In my opinion, yes, there are better solutions that what you currently have and what you propose.
I prefer solutions that completely automate the process without needing your own scripts but instead relying on open source projects.
I personally use sickrage and couchpotato to automate downloands on sabnzbd and transmission. these are renamed/moved using the nzbToMedia scripts.

2) either will work. I suggest you minimize the amount of mountpoints, and have a single dataset mounted from your freenas host. in there you can create folders for transmissions download folder(s)
here's my setup, sickrage and couchpotato have completed downloads go into category sub-directories. I also define an incomplete download directory to keep things more organized
/mnt/tank/media > /mnt/media (in the jail)
/mnt/media/downloads/transmission/
/mnt/media/downloads/transmission/incomplete
/mnt/media/downloads/transmission/complete
/mnt/media/downloads/transmission/complete/tv
/mnt/media/downloads/transmission/complete/movie

3) you do not need any specific permissions to "access the web GUI", but whatever user transmission runs as needs to have permissions to write files where you set the download directory to.
changing transmission user is a good solution and is what I do. follow "Solution 2" here
https://forums.freenas.org/index.ph...plugins-write-permissions-to-your-data.27273/

4) if you run 'pkg install transmission-daemon' it will download the dependencies you need, including the other packages you mentioned.

Thanks a lot for the write up and info. It definitely gets me going in the right direction. I had read somewhere before of users creating datasets for each media type and then mounting each one of those into the jail. So I had already created the following datasets:

/mnt/tank/media/anime
/mnt/tank/media/movies
/mnt/tank/media/tv_shows
/mnt/tank/media/movies-4k-hdr
/mnt/tank/media/other
/mnt/tank/media/torrents
/mnt/tank/media/downloads

So in the jail:
mnt/media/anime
mnt/media/movies
mnt/media/tv_shows
mnt/media/movies-4k-hdr
mnt/media/other
home/transmission/torrents
home/transmission/downloads

If I went your method at this point and migrated the files into folders under the /mnt/media dataset, I'd have to migrate about 2 TB worth to do so I'd like to avoid that. Is there any real harm in mounting that many dataset paths into the jail?

With regards to running transmission as a user. I know it's recommended for transmission to be run as the user 'transmission'. As I also understand it, you do not want the transmission user to have su privileges for security reasons. Is this correct?

Does the 'transmission' user need only to exist in the transmission jail?

Can you please tell me if I have the methodology correct in order to do that?


I create a user in the transmission jail called 'transmission'.
From root, I su to transmission.

[root@transmission /]# su transmission
[transmission@transmission /]$
[transmission@transmission /]$pkg install transmission-daemon
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I see no real issue with having multiple mount points into the jail I just prefer it so if I did move files around they aren't actually being rewritten. Also makes things a little simpler to snapshot.

it's not necessarily recommended to run as the user 'transmission', but that is the default. In my setup, I change transmissions user using 'solution 2' from the thread I linked.
Yes, I definitely would not give the transmission user 'su' privileges, but since transmission is running in a jail it really can only mess things up in there anyway.

yes, it only needs to exist in the jail.

no, the steps you listed do not really make sense.
- you do not need to create the transmission user in the jail. installing the transmission package will do that for you.
- the transmission user can't install packages, only root can do that.
If all you want to do is install transmission, running "pkg install transmission-daemon" will do this for you, create the 'transmission' user in the jail, and use that user by default.
 

Digitaldreams

Explorer
Joined
Mar 7, 2017
Messages
80
I see no real issue with having multiple mount points into the jail I just prefer it so if I did move files around they aren't actually being rewritten. Also makes things a little simpler to snapshot.

it's not necessarily recommended to run as the user 'transmission', but that is the default. In my setup, I change transmissions user using 'solution 2' from the thread I linked.
Yes, I definitely would not give the transmission user 'su' privileges, but since transmission is running in a jail it really can only mess things up in there anyway.

yes, it only needs to exist in the jail.

no, the steps you listed do not really make sense.
- you do not need to create the transmission user in the jail. installing the transmission package will do that for you.
- the transmission user can't install packages, only root can do that.
If all you want to do is install transmission, running "pkg install transmission-daemon" will do this for you, create the 'transmission' user in the jail, and use that user by default.


Okay, that makes a lot of sense. So to confirm, after creating the jail, just run 'pkg install transmission-daemon' as [root@transmission /]?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Okay, that makes a lot of sense. So to confirm, after creating the jail, just run 'pkg install transmission-daemon' as [root@transmission /]?
yes, and go through the prompts.
You will also need to enable the service with "sysrc transmission_enable=YES"
this is handled in the gui with the plugin.
 

Digitaldreams

Explorer
Joined
Mar 7, 2017
Messages
80
yes, and go through the prompts.
You will also need to enable the service with "sysrc transmission_enable=YES"
this is handled in the gui with the plugin.

Cool. And since the user transmission is created during the install, I'll be able to run from freeNAS local 'jexec -U transmission <JID> tcsh' to get into the jail as the user transmission?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Cool. And since the user transmission is created during the install, I'll be able to run from freeNAS local 'jexec -U transmission <JID> tcsh' to get into the jail as the user transmission?
i'm not exactly sure.
the user's default shell is '/usr/sbin/nologin' so I do not think so.
though you could change this with "chsh -s /bin/sh transmission"
 

Digitaldreams

Explorer
Joined
Mar 7, 2017
Messages
80
i'm not exactly sure.
the user's default shell is '/usr/sbin/nologin' so I do not think so.
though you could change this with "chsh -s /bin/sh transmission"


Awesome. I really appreciate the help. This will get me going until get to where I need start configuring the config file.

One last question which is a little off topic. Since you mention being able to change the shell, I'm really looking at using bash and creating my own alias's. I've installed bash in the transmission jail as root. I then mounted the path from the freenas local from the message that appears after the bash install. The problem is after creating an alias, it wipes after I logout. The issue is I can't find the .bashrc file or any bash profile. I don't thing the files exist even though I am able to use the bash shell.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I'm not sure. I try to avoid using bash, and any script I write are always completely POSIX compliant so they work with /bin/sh
 

Digitaldreams

Explorer
Joined
Mar 7, 2017
Messages
80
I'm not sure. I try to avoid using bash, and any script I write are always completely POSIX compliant so they work with /bin/sh


OK cool.. Something else just occurred to me. So should I be logged into the transmission jail CLI as root and configuring transmission from root? I'd rather not be making all changes as root.

Should I just create a user form within the CLI and enable the account sudo?

I think following your solution #2 would take care of this basically .
 
Last edited:

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
OK cool.. Something else just occurred to me. So should I be logged into the transmission jail CLI as root and configuring transmission from root? I'd rather not be making all changes as root.

Should I just create a user form within the CLI and enable the account sudo?

I think following your solution #2 would take care of this basically .
Yup to you.

Most settings are available from transmission's WebUI. When I do need to edit settings.json directly I do it as root, then make sure to reload transmission with 'service transmission reload'
 
Status
Not open for further replies.
Top