SmallGuy
Guru
- Joined
- Jun 7, 2013
- Messages
- 560
Since there is a lot of posts about the permissions management of the Transmission downloads and torrents directories, and there are still new posts about the same troubles, I want share my little experience.
I don't have the pretention to say that is the best nor the only solution but it works like a charm for me. Perhaps I'm wrong, but in this case I'm sure some members will point it out.
I have spend so many time to accomplish this... Freenas Documentation learning, shell commands research, Googling etc...
Nevertheless, today it looks like very easy, cause I have a better understanding of how Freenas tik, and a little bit of experience with the shell (the "Dark side" as I like name it).
I have answered 2 posts, but backward regarding, it seems confusing
cause I try to transpose my configuration and I always forget a detail (or two).
So I think a better way is to expose my transmission set-up as an exemple.
I don't make a step by step methodology, just give you my strategy.
I let you with the documentation and Internet to achieve the aim.
Blablablablalba...
As I like to know where I go and that "a problem well exposed is half resolve" then:
My goals were:
I want access thru my CIFS share the "Telechargements" and "Torrents" directories, witch are respectively my Downloads and Watch directories for Transmission.
My problematic was:
I need that Transmission plugin and some users of my CIFS share can access the same content without using the shell to change the permissions, and want restrict access only for users needing it.
Plugin Jail and Freenas are separated "OS" (vocabulary are still missing me).
My solution is:
This is the content of 1 directory Invite inside a dataset call Invite:
The directory Invite is CIFS shared.
So Telechargements and Torrents are there.
The users needing access to "Telechargements" and "Torrents" directories belong to the Invite group (id number of the Invite_group=1003, easy to find in the GUI).
As you can see Telechargements and Torrents directories are own by 40003 witch is the username id number of Transmission inside my Freenas:
Transmission Plugin started, Type in "top" in the shell on Freenas and found the USERNAME of Transmission (a number as you can see) :
On the jail side:
1003 is the same id number of Invite than inside Freenas.
/media/Telechargements is the Download directory define in the transmission options configuration GUI, and /media/Torrents is the Watch directory.
Create your mountpoint accordingly:
Source -->Destination
/mnt/Volume1/Invite/Invite/Telechargements --> /mnt/Volume1/Jail/Jail/media/Telechargements
/mnt/Volume1/Invite/Invite/Torrents -->/mnt/Volume1/Jail/Jail/media/Torrents
A very good tip to know is to set umask=0 in the settings.json file, as it isn't set to 0 by default and isn't in GUI.
This setting allow Transmission to apply 777 to all the downloads.
location:
With this configuration, only users belonging to the Invite group can access Telechargements and Torrents from the CIFS share (and Transmission also).
My goal is reached! :)
Now I have to edit my two confusing replies and link to this.
PS: For those with good eyes, you can guess that I got a sftp share also on this dataset with Invite as home directory (despite I know it isn't recommanded to have different shares on a same dataset, but it's My Freenas :p ).
I don't have the pretention to say that is the best nor the only solution but it works like a charm for me. Perhaps I'm wrong, but in this case I'm sure some members will point it out.
I have spend so many time to accomplish this... Freenas Documentation learning, shell commands research, Googling etc...
Nevertheless, today it looks like very easy, cause I have a better understanding of how Freenas tik, and a little bit of experience with the shell (the "Dark side" as I like name it).
I have answered 2 posts, but backward regarding, it seems confusing
So I think a better way is to expose my transmission set-up as an exemple.
I don't make a step by step methodology, just give you my strategy.
I let you with the documentation and Internet to achieve the aim.
Blablablablalba...
As I like to know where I go and that "a problem well exposed is half resolve" then:
My goals were:
I want access thru my CIFS share the "Telechargements" and "Torrents" directories, witch are respectively my Downloads and Watch directories for Transmission.
My problematic was:
I need that Transmission plugin and some users of my CIFS share can access the same content without using the shell to change the permissions, and want restrict access only for users needing it.
Plugin Jail and Freenas are separated "OS" (vocabulary are still missing me).
My solution is:
This is the content of 1 directory Invite inside a dataset call Invite:
The directory Invite is CIFS shared.
Code:
[root@fomonas] /mnt/Volume1/Invite/Invite# ls -l total 185 drwxrwx--- 5 Invite Invite 5 Sep 28 22:49 ./ drwxr-xr-x 4 root wheel 4 Jul 27 10:13 ../ drwxrwx--- 10 Invite Invite 58 Sep 29 17:19 Logiciels/ drwxrwx--- 2 40003 Invite 5 Sep 28 23:16 Telechargements/ drwxrwx--- 2 40003 Invite 5 Sep 24 20:56 Torrents/ [root@fomonas] /mnt/Volume1/Invite/Invite#
So Telechargements and Torrents are there.
The users needing access to "Telechargements" and "Torrents" directories belong to the Invite group (id number of the Invite_group=1003, easy to find in the GUI).
As you can see Telechargements and Torrents directories are own by 40003 witch is the username id number of Transmission inside my Freenas:
Transmission Plugin started, Type in "top" in the shell on Freenas and found the USERNAME of Transmission (a number as you can see) :
Code:
PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 2112 root 6 44 0 193M 93828K uwait 1 6:16 0.20% python 2273 root 7 44 0 70560K 10252K ucond 1 43:54 0.00% collectd 98052 40003 3 44 0 98M 81212K select 1 21:59 0.00% transmissi 2256 root 1 44 0 5692K 1228K nanslp 0 0:32 0.00% inadyn
On the jail side:
Code:
Jail# cd /media Jail# ls -l total 494 drwxrwxr-x 2188 1004 1005 2188 Aug 3 11:31 Music drwxrwx--- 2 1004 1005 2 May 7 18:54 Musique drwxrwxr-x 53 1004 1005 54 Sep 28 20:37 Photos drwxrwx--- 2 transmission 1003 5 Sep 28 23:16 Telechargements drwxrwx--- 2 transmission 1003 5 Sep 24 20:56 Torrents drwxrwxr-x 4 1004 1005 4 Jun 5 07:45 Videos drwxrwx--- 2 1004 1005 2 May 7 18:52 iTunes Jail#
1003 is the same id number of Invite than inside Freenas.
/media/Telechargements is the Download directory define in the transmission options configuration GUI, and /media/Torrents is the Watch directory.
Create your mountpoint accordingly:
Source -->Destination
/mnt/Volume1/Invite/Invite/Telechargements --> /mnt/Volume1/Jail/Jail/media/Telechargements
/mnt/Volume1/Invite/Invite/Torrents -->/mnt/Volume1/Jail/Jail/media/Torrents
A very good tip to know is to set umask=0 in the settings.json file, as it isn't set to 0 by default and isn't in GUI.
This setting allow Transmission to apply 777 to all the downloads.
location:
/<transmission_path>/pbi/transmission-amd64/etc/transmission/home/settings.json
With this configuration, only users belonging to the Invite group can access Telechargements and Torrents from the CIFS share (and Transmission also).
My goal is reached! :)
Now I have to edit my two confusing replies and link to this.
PS: For those with good eyes, you can guess that I got a sftp share also on this dataset with Invite as home directory (despite I know it isn't recommanded to have different shares on a same dataset, but it's My Freenas :p ).