Permission denied when downloading in Transmission

Status
Not open for further replies.

hennning

Cadet
Joined
Jul 10, 2015
Messages
4
I just started using Freenas and my first mission is to setup a fully automated setup with Transmission, Couchpotato and Sickbeard/Sickrage.

I have gotten around a few issues I've had as a newbie but one issue persists that I can't seem to get my head around.

Every time I try to download a file in Transmission I get Permission Denied.
I have followed several guides on both youtube and the forums but always get back to this same issue. I must be doing something terribly wrong that I just don't see.

I have googled the error but none of the answers out there has helped.

I have created a raidz pool. Because I have different sized disks (3tb and 2tb) I have done this in the shell to get a raidz1. The pool is named tank.

I have created two users. 1: Transmission with UID 921. 2: media with UID 816.

I have created a dataset named media
  • User: Transmission
  • Group: Media
  • Permission type: Windows
In this dataset I have created 4 directories downloads, movies, torrentfiles, series which have the same settings as above.

I have downloaded the plugin and added storage to the correspondent jail according to the following:
  • Transmission
    • Source: /mnt/tank/media/downloads Destination: /media/downloads
    • Source: /mnt/tank/media/torrentfiles Destination: /media/torrentfiles
    • Source: /mnt/tank/media/series Destination: /media/series
    • Source: /mnt/tank/media/movies Destination: /media/movies
I have created a CIFS share for /mnt/tank/media

In the Transmission webgui I have set the default download directory to /media/downloads.

When I try to download a file I get "Permission denied (/media/downloads/[Foldername]/[Filename])"
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
please try a solution from here
https://forums.freenas.org/index.ph...plugins-write-permissions-to-your-data.27273/

I personally would add a media user (with UID 816) to the transmission jail, and set that as the user that transmission runs as. I would also run these plugins all in the same jail so the 'media' user is created for me, and I only need to mount my media dataset to a single jail.

Also, a note on your configuration. By having your downloads and final media storage location on different datasets/using different mountpoints into the jail, CP/SB/SR needs to do a read-write-delete operation when post-processing files instead of just updating pointers.

I have my personal setup documented on my blog (Google "jruehlig freenas"), it might be of interest, but I also utilize sabnzbd, so you might not want to do that.
 

hennning

Cadet
Joined
Jul 10, 2015
Messages
4
Thank you
I had tried that but with no success.
But I got it working just now from another post I found.

The thing is that the guide in your link tells you to run "chown -R USER:GROUP" which made me run "chown -R transmission:media" and all different combinations.
But according to https://forums.freenas.org/index.ph...ion-permission-denied-error.9556/#post-111725 you need to run "chown" with the UID.

So I ran "chown 921:921 /media/". And the same for all subdirectories where I want to download stuff and now everything works.
I also needed to run the exact same command on the Couchpotato and SickRage jails for them to work.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Please start over. You shouldn't use the cli to create your pool. Freenas doesn't work like that. You need to have swap space and gptids configured.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Thank you
I had tried that but with no success.
But I got it working just now from another post I found.

The thing is that the guide in your link tells you to run "chown -R USER:GROUP" which made me run "chown -R transmission:media" and all different combinations.
But according to https://forums.freenas.org/index.ph...ion-permission-denied-error.9556/#post-111725 you need to run "chown" with the UID.

So I ran "chown 921:921 /media/". And the same for all subdirectories where I want to download stuff and now everything works.
I also needed to run the exact same command on the Couchpotato and SickRage jails for them to work.
you can run chown with names or (U/G)IDs, names are just mapped to the (U/G)ID based on what context the command is being run.

You didn't need to run the command in the other jails, if you read the "Facts" section of the thread I linked I explain that files, no matter what context they are being viewed from always are owned by the same UID/GID.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Please start over. You shouldn't use the cli to create your pool. Freenas doesn't work like that. You need to have swap space and gptids configured.
you don't need to have swap, though it's probably recommended.
as for using gptids, I always use raw devices (/dev/ada0) and haven't had an issue with ZFS not finding my drives.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
you don't need to have swap, though it's probably recommended.
as for using gptids, I always use raw devices (/dev/ada0) and haven't had an issue with ZFS not finding my drives.
I didn't say zfs I said freenas wants gptids. There are lots of examples of people messing up their pools because they unknowingly used the cli to create the pool or replace a drive. Swap isn't required but it's nice if you replace a drive and the size is off by a bytes or two it will still work because it can just make the swap smaller to accommodate the size difference.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I didn't say zfs I said freenas wants gptids. There are lots of examples of people messing up their pools because they unknowingly used the cli to create the pool or replace a drive. Swap isn't required but it's nice if you replace a drive and the size is off by a bytes or two it will still work because it can just make the swap smaller to accommodate the size difference.
Agree with all your points. I think I've been lucky cause I always make systems with identical drives, but don't recommend what I'm doing to others.
 

hennning

Cadet
Joined
Jul 10, 2015
Messages
4
Please start over. You shouldn't use the cli to create your pool. Freenas doesn't work like that. You need to have swap space and gptids configured.
I have 2x3TB disk and 2x2TB disk and I wanted to create a raidz1 since I can't change that in the future.
And since FreeNAS don't support creating a raidz with different sized disks from the gui I decided to do it from CLI.
My plan is to change the 2TB disks in the future with 3TB and then extend, I saw that was possible.

Maybe a bad idea, maybe not but buying 2 extra disks right now is not an option because I'm already in the red money wise for the other parts I had to buy for this NAS.
But if my setup needs swap and gptids and you can show me how to solve that with different sized disks I'm happy to restart :)
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
In the GUI when you create storage select the manual button on the storage creation wizard. This is why that button is there.
 

hennning

Cadet
Joined
Jul 10, 2015
Messages
4
I did not know that button existed, thank you.
I have googled Freenas raidz with different sized disks and all the suggestions I've found is to do it via CLI.

I will redo everything now, for like the 100th time :p
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,976
Better to learn now when its in the early stages rather than later when your pool is full and your having issues you cant figure out.

I built a test system on old hardware to learn on before i commited to purchasing all my hardware for my current build.
 
Status
Not open for further replies.
Top