Transmission Permission Denied

Status
Not open for further replies.

Gunsmithy

Dabbler
Joined
Feb 17, 2016
Messages
11
Hello hopefully my saviours!

I've been bashing my head against this problem for a few days now looking at guides all over the web and these forums but just can't seem to get it working. I'm hoping someone sees some obvious mistake I'm making so we can finally call it a day! I know I'm not the only one with a problem like this before, and while I couldn't find a solution that worked for me out there, maybe I will now.

Anyways, I just wanted to install the Transmission plugin and have it work. No matter how I seem to configure it I get permission denied errors like so:
cddde4aeed.png


My Transmission plugin config is here. I chose 775 for the umask since I plan on having group access to the download folder for Sonarr and such.
547ea26688.png

I've set up a dataset called DownloadTemp to store the torrents in I later want Sonarr and such to have access too so I have it owned by the group "media" (816) with the intention of having them all able to access it as a group.
ed12bb6576.png

Naturally I have this group in the GUI as well, using GID 816 to match what I'm told some other plugins like Plex use to make things easier in the future.
407cebe0ad.png

So I followed the steps of mounting the dataset to a location in the jail using the GUI as shown here.
4fedb46634.png

Then I followed the lovely guide provided by forum member joshua-parker-ruehlig here at https://forums.freenas.org/index.ph...plugins-write-permissions-to-your-data.27273/ and went with solution #3, group write access. For this I added a group called media with GID 816 to the jail and added transmission to said group which I show here.
e4631997a4.png

This however, did not seem to be enough with all the errors I got, so with some more digging and learning about UNIX permissions (I'm still new to this, but that's part of the reason I built this machine, to learn!) I found that the umask could be a concern. Now with the Transmission daemon supposedly setting this based on the settings file, I checked that immediately and found it to be 2 as expected.
674f88e6b0.png

So then I started looking at the umask and permissions of all the folders themselves starting with the dataset:
10ab1a49dd.png

Looks good to me. Then the mount point from the main shell/freenas perspective:
3c89034121.png

Still looks good, now finally from the jail's perspective:
4b4cf2f453.png

This does not look good! All the ownerships and permissions seem fine to me if the GIDs map between FreeNAS and the jails as described, but that umask is still 22 not 2. Changing it only makes it stay until the next time the jail is restarted which is no good, and does nothing anyways until it is.

On top of all of this I even tried setting the dataset permissions to 777 and the umask to 0 but it always seems to change back to 22 no matter what I do. I feel like the problem has something to do with that, and if it is or something else entirely, please let me know, and I appreciate you getting this far through my post anyways.

Thanks in advance!

Gunsmithy
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
hmm, it looks like you should have group write permissions, looks like you did everything correctly. I've honestly never used group writing, so maybe it doesn't work as I describe? maybe the process had a group so adding transmission to the media group isn't enough?

there's no reason to mess with umask directly, I adding the permission setting to the freenas transmission config and it sets this for you. anything that mentions umask with the transmission plugin is outdated information. but, this setting never helps transmission write files, it only changes what files are written as from transmission.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949

Gunsmithy

Dabbler
Joined
Feb 17, 2016
Messages
11
I was wondering how to change the plugin's group too because I thought that may have been it, but what you suggested didn't appear to work. It's weird because I think Sonarr has group access just fine, but that being said I believe its default group was media:816. One curious thing that occurred when restarting transmission though was this. The chown has me suspicious of what it's doing.
c1ef0f3124.png
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I was wondering how to change the plugin's group too because I thought that may have been it, but what you suggested didn't appear to work. It's weird because I think Sonarr has group access just fine, but that being said I believe its default group was media:816. One curious thing that occurred when restarting transmission though was this. The chown has me suspicious of what it's doing.
c1ef0f3124.png
no need to be suspicious, I understand why that error message is coming up. kind of a lengthy explanation and I'm on my phone right now, so maybe I'll post it later.

you might want to try editing /usr/local/etc/rc.d/transmission to force the group you want. I think the way the script is it doesn't respect the transmission_group we tried settings.

####
yeah, the sonarr plugin uses media by default for now.
a know working solution is using the media user for transmission (solution 2) this is what I personally do.
 

Gunsmithy

Dabbler
Joined
Feb 17, 2016
Messages
11
Haha, yeah I'm on my phone at work now too. No offence meant by the suspicion btw, just thought it could be the culprit. I'm trying to look at the rc.d file now but my FreeNAS GUI shell is doing this weird thing now where it totally resets about every 30s-min. Rebooting doesn't help. Any idea on this one now? Haha, why do these things always happen to me.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Haha, yeah I'm on my phone at work now too. No offence meant by the suspicion btw, just thought it could be the culprit. I'm trying to look at the rc.d file now but my FreeNAS GUI shell is doing this weird thing now where it totally resets about every 30s-min. Rebooting doesn't help. Any idea on this one now? Haha, why do these things always happen to me.
none taken

i don't know much about that shell, I prefer to ssh.
 

Gunsmithy

Dabbler
Joined
Feb 17, 2016
Messages
11
I fired up SSH for now. I'll save that diagnosis for another time and another thread. :P
Here's looking at the file at what seems to be the point of interest.
4e5dd6d96e.png

The group line looks out of place to me. Also the config directory is not the /var/db/transmission etc I expected. Going to the location it has there is empty. Download directory is the same place too, also seemingly incorrect. Thoughts?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I fired up SSH for now. I'll save that diagnosis for another time and another thread. :p
Here's looking at the file at what seems to be the point of interest.
4e5dd6d96e.png

The group line looks out of place to me. Also the config directory is not the /var/db/transmission etc I expected. Going to the location it has there is empty. Download directory is the same place too, also seemingly incorrect. Thoughts?
if you look at /etc/rc.conf that's where variables should be changed. I was just saying the way that script sets transmission_group isn't standard and might be causing the issue here.
 

Gunsmithy

Dabbler
Joined
Feb 17, 2016
Messages
11
So many places! Looking at that file the download directory was initially blank so I set it to mine and started the service but no luck either.
e95dc2495a.png
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
So many places! Looking at that file the download directory was initially blank so I set it to mine and started the service but no luck either.
e95dc2495a.png
I never told you to do that... your issue is with the incomplete download directory that you set in the freenas transmission settings menu. the actual download location can be set in that file, or in transmission (through the webui or settings.json) but I don't think you understand you were setting the incomplete download directory earlier.
 

Gunsmithy

Dabbler
Joined
Feb 17, 2016
Messages
11
Well that can be easily reversed back to blank. There isn't a place to set the Download Directory in FreeNAS gui though, just settings.json like you said or the transmission web ui.
However I believe you just fixed my issue here. Wait for it, drum roll please... I didn't have an incomplete directory.
I was under the false assumption that one would be created if there was none there like jail Storage mounting but it did not. Possibly because it would have tried to as the transmission user in the media folder owned by root and therefore been denied.
I definitely should have caught it, so my apologies for wasting your time, but you last message is what sparked my mind to check it. The transmission ui error lead me to believe it had issue with the download not incomplete folder, but it makes perfect sense in hindsight that it would need incomplete first, but an odd error message none the less.
So I just ssh'd in, mkdir an incomplete folder where I already pointed, chowned it as root:media and chmod 775. Looks to be writing as a group fine to temp, and with a little waiting it moved into group download folder fine too.
May this thread forever remain a testament to my stupidity and perhaps give some guidance to others in the future as to what not to do. :P

I guess my final question/concern would be that of fixing the execute permissions of the download. I believe Sonarr has the option to chmod new downloads it imports, but it's still curious that I'm seeing what appears to be no execute by anyone on new downloads, which I suppose could be a minor nuisance for other types of downloads.
fc117b3c3a.png
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
awesome good catch.

I didn't want to add any redundanct settings to the freenas menu, which would overwrite what was set in the transmission webui, that's why only incomplete is there.

transmission never gives execute permissions to files, I think it's a security thing. so whatever you set transmission to write as is only for the folders.
 

Gunsmithy

Dabbler
Joined
Feb 17, 2016
Messages
11
I figured that was the reason. I could see them very easily getting out of sync.

And fair enough! Probably for security, and I can work with that.

You're an absolute saint. Can I get you a coffee or something on PayPal? haha
 
Status
Not open for further replies.
Top