transmission jail - watch folder

Status
Not open for further replies.

headcrunch

Dabbler
Joined
Dec 11, 2016
Messages
12
I created a user&group named transmission.
I created a dataset transmission with windows permissions and assigned the transmission user & group to that dataset.
Then i installed the transmission plugin and added a storage to the jail.
My folder structure inside the jail is.

/media
/media/completed
/media/incomplete
/media/watch

Also i created a cifs share for the transmission dataset. i can see the share and i can access all the folders but i cannot write to it, so my idea was to give the files 777 inside the jail. that doesnt work.

any help is welcome.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I don't understand windows permissions but if you show the output of 'ls -l /media' in the jail maybe I can help.
 

headcrunch

Dabbler
Joined
Dec 11, 2016
Messages
12
Thanks for your reply but i solved it just now.

For everybody experiencing the same problem i'll show you how i did it:

In the WebUI i have:
user: transmission (uid 1005)
group: transmission (gid 1013)

In my transmission jail however i have the same user/group but with different uid/gid:
user: transmission (uid 921)
group: transmission (gid 921)

So i had to change the uid/gid inside the jail to match the freenas uid/gid for the user/group transmission.

Stop your transmission service.

login as root via ssh and do the following:
Code:
[root@freenas] /mnt/pool1# jls
   JID  IP Address	  Hostname					  Path
	 3  -			   syncthing_1				   /mnt/pool1/jails/syncthing_1
	 6  -			   transmission_1				/mnt/pool1/jails/transmission_1


in my case the jail number is 6, so to get inside the jail do:
Code:
[root@freenas] /mnt/pool1# jexec 6 tcsh
root@transmission_1:/ #


a listing of the filesystem looks like this
Code:
root@transmission_1:/ # ls -al
total 173
drwxr-xr-x  18 root	wheel		   22 Jan  7 17:48 .
drwxr-xr-x  18 root	wheel		   22 Jan  7 17:48 ..
-rw-r--r--   2 root	wheel		  966 Mar 25  2016 .cshrc
drwxr-xr-x   2 root	wheel			4 Jan  8 18:03 .plugins
-rw-r--r--   2 root	wheel		  254 Mar 25  2016 .profile
-r--r--r--   1 root	wheel		 6197 Mar 25  2016 COPYRIGHT
drwxr-xr-x   2 root	wheel		   47 Mar 25  2016 bin
drwxr-xr-x   8 root	wheel		   50 Mar 25  2016 boot
dr-xr-xr-x  11 root	wheel		  512 Jan 10 07:25 dev
drwxr-xr-x  23 root	wheel		  107 Jan 10 07:25 etc
drwxr-xr-x   3 root	wheel		   52 Mar 25  2016 lib
drwxr-xr-x   3 root	wheel			5 Mar 31  2016 libexec
drwxrwxr-x+  5 921  921	 5 Jan  8 14:45 media
drwxr-xr-x   2 root	wheel			2 Mar 25  2016 mnt
dr-xr-xr-x   1 root	wheel			0 Jan 10 07:32 proc
drwxr-xr-x   2 root	wheel		  146 Mar 25  2016 rescue
drwxr-xr-x   2 root	wheel			7 Jan  8 18:06 root
drwxr-xr-x   2 root	wheel		  132 Mar 25  2016 sbin
lrwxr-xr-x   1 root	wheel		   11 Mar 25  2016 sys -> usr/src/sys
drwxrwxrwt   6 root	wheel			6 Jan 10 07:25 tmp
drwxr-xr-x  15 root	wheel		   15 Jan  8 18:03 usr
drwxr-xr-x  25 root	wheel		   25 Jan 10 07:25 var
root@transmission_1:/ #


change the uid to match the freebsd uid (in my case 1005):
Code:
pw user mod transmission -u 1005

change the gid as well (in my case 1013)
Code:
pw group mod transmission -g 1013


you have to edit the /etc/passwd file as well (i guess not sure about that one), and you should do it with vipw, so it looks like this:
Code:
transmission:*:1005:1013::0:0:Transmission Daemon User:/usr/pbi/transmission-amd64/etc/transmission/home:/usr/sbin/nologin


restart your jail, start the transmission service and you should be golden.
 
Status
Not open for further replies.
Top