Transmission permissions

Status
Not open for further replies.

Chris230291

Patron
Joined
Mar 21, 2012
Messages
300
Hello. I'm running the Transmission plugin on FreeNas 9 and everything works as far as downloading. However I loose the ability to write/delete files in the share i have where the downloads are saved to. If i "set permissions reclusively" (without changing any other options) on the dataset, i am able to write to the share again, but then Transmission breaks.

Is this normal behaviour? Why cant both myself AND Transmission have write access? I like to move the files to a different dataset after they have finished downloading and delete the orrigonal in the downloads dataset/share.

Any help is greatly appreciated.

Chris.
 

ndboost

Explorer
Joined
Mar 17, 2013
Messages
78
you need to do two things...

1) create a transmission user and group with the same uid/gid
2) make sure the share has appropriate group permissions..

for me i have a group called staff, which is what my macbook uses.. this staff group is assigned to transmission user and my user. my shared mounts are chown'd to the staff group. with 775 permissions.
 

Chris230291

Patron
Joined
Mar 21, 2012
Messages
300
Dude... Your a legend!
This has been driving me crazy since day one. All sorted now :)

Note to others: I also had to change the dataset permissions.

Cheers,
Chris.
 

Chris230291

Patron
Joined
Mar 21, 2012
Messages
300
Hello again. I just tried adding another torrent to Transmission but it say's, "Error: Permission denied (/usr/Downloads/*torrent file name*.rar)
". A previously added torrent is now broken too.​

I have a group called "Chris" with 2 users, "Chris" and "Transmission". Both users are 1001 and so is the group.

In both the shares and volumes permissions settings i have given both owner and group full permissions to write and execute. What else could i be missing?

With regards to the 775 thingy, do i run "chmod 775 /usr/Downloads" ? Once i do the "Jexec *Jail ID* tcsh"

Thanks!
 

Chris230291

Patron
Joined
Mar 21, 2012
Messages
300
Can anyone help? I've been fighting with settings for a few day now and i still cant get it right. It cant be that complicated can it?
 

Chris230291

Patron
Joined
Mar 21, 2012
Messages
300
Come on guys whats the deal?

I've set the Transmission user ID to 20 to match the group ID (Now using the default option of "staff"). Still wont work. It will download a few MB's of a file then through a hissy fit regarding permissions. Am i to assume it's because it's stored in the RAM before it tries writing it to the designated directory?

As soon as i run any chown or chmod commands in the shell (as per the instructions in the freenas plugins tutorial on YouTube), Transmission starts working again but then i cant write in the AFP share. I check the permissions for the data set and they've returend to (the default) "root" and "wheel". I cant make any sense of this. Please someone help me out here.

Thanks,
Chris.
 

Chris230291

Patron
Joined
Mar 21, 2012
Messages
300
Finally figured it out and i have it working exactly how i wanted it!
It's funny (not really) because the settings and permissions i have now are identical to the very first ones i started with. I think maybe the problem was with the jail or something because deleting it and starting over sorted all the problems i was having.
 

mrunderhill

Cadet
Joined
Sep 17, 2013
Messages
6
Hey Chris - can you tell me how you've solved it? I'm going crazy with the same problem (Transmission works, files are downloaded, but can't be viewed outside of the jail unless I log on as root).
I have one user, "media", with uid 1001 and gid "wheel", which also is the user I've set on the whole volume.
What should I set in the jail to make it all go smoothly?
Thanks!
 
Joined
Dec 9, 2016
Messages
1
Spent hours trying to figure this out, thought I share with the rest of the class.


Quick Fix
You can do chmod -R 777 'path/to/transmission/downloads/folder' and be done with it.

Obviously this exposes your folder to everyone. If you need a cleaner way do approach this, keep reading. Bear with me it is rather long.

Also with this you can have transmission and SABnbz under the same dataset with permission controlled via FreeNAS instead of messing with commands again - this is a once off.



Background

My dataset is 'vol2/Downloads/'

2 folder inside this as
SABnbz
Transmission
The transmission jail '/media/' folder is linked to 'vol2/Downloads/Transmission'

Permissions on Dataset - 'vol2/Downloads/'
Owner: 'media' - built in group
Group Name: 'plugins' - I created this group for better control
Group ID: 1001 - this could differ in your case, have anything you like
Access: The owner and group has read/write/execute access (770)

Reason for picking 'media' as the owner
(SABnbz/Couchpotato & the 90% of the other plugins uses the user 'media')
https://forums.freenas.org/index.ph...plugins-write-permissions-to-your-data.27273/



Steps

The 'plugins' group exist as a freeNAS group but not within your transmission jail.

Go into the transmission jail (shell access)

Create a group inside the jail with the right group ID (group ID is important, not so much the name)
pw groupadd plugins -g 1001

Add the transmission user to this group
pw usermod transmission -G plugins

Re-apply dataset permissions recursively (for good measure)

Restart the jail



Result

You should now have SABnbz working without a hitch because the folder is owned by user 'media'.

Transmission should also work as it is part of the group 'plugins'

:)
 

Scharbag

Guru
Joined
Feb 1, 2012
Messages
620
The way I deal with this issue is I change the user that executes transmission to the same user that all of my files are owned by. The tutorial on how to do this is here.

In a nutshell:

Code:
In the jail, add a user with a matching UID as the owner of the data dataset/folders:

pw useradd -n USER -u NNN -d /nonexistent -s /usr/sbin/nologin

In the jail, change the user the plugin runs as, and change ownership of the data-directory (replace PLUGIN with the name of the plugin such as transmission, sonarr, etc.:

	1	service PLUGIN onestop
	2	chown -R USER:GROUP /var/db/PLUGIN
	3	sysrc 'PLUGIN_user=USER’
	4	service PLUGIN start

There may also be a folder and files in /var/run that will need to be chowned to the new user too.

Most times it will take a jail restart to work properly.


I find this the most fool proof way to avoid permission issues as all of my plugins run as my main user.

Cheers,
 
Status
Not open for further replies.
Top