CouchPotato doesn't play nice with storage

Status
Not open for further replies.

ninjai

Explorer
Joined
Apr 6, 2015
Messages
98
I have 3 plugins set up:
  • Transmission
  • SickRage
  • CouchPotato
Sickrage works flawlessly. It can reach out to transmission, download a torrent, extract the download (if required), and move the data after.

Couchpotato, even though it's set up the same, can't. My problem is this:

If I set the download directory within couchpotato to anything other than the default location (which I have no idea where that is because it doesn't tell you) I get permission denied errors in transmission.

Am I correct to assume the permission denied is coming from the couchpotato jail, and not the transmission jail?

On couchpotato I mount 2 folders in /media. 1 of them is where I want my download to end up, the other is where I "cache" the download (for seeding):
Capture.PNG

I've used this guide to permit write access to the storage:
https://forums.freenas.org/index.ph...plugins-write-permissions-to-your-data.27273/

My user ID is in the jail and owns the folder mount points:
Capture2.PNG


Here is my user ID in freeNAS, to show that the user ID's are the same:
Capture3.PNG

Here's the jail's rc.conf:
Capture4.PNG

Here is showing you that my user owns the /var/db/ folder for couchpotato:
Capture5.PNG

No matter what I seem to do I get errors writing to my dataset from this plugin only. What could I possibly be missing?
 

itchiTrigger

Dabbler
Joined
Jan 17, 2015
Messages
23

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
What are the permissions on the files in those directories? Things look correct so far.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Can you show the output of the below from the couchpotato_1 jail?
Code:
ls -l /media
ls -l /media/download_cache
 

ninjai

Explorer
Joined
Apr 6, 2015
Messages
98
Can you show the output of the below from the couchpotato_1 jail?
Code:
root@couchpotato_1:/media # ls -l
total 113
drwxrwxrwx+  2 steve  wheel  2 Jul  4 12:41 download_cache
drwxrwxr-x+ 120 steve  wheel  129 Jun 29 11:49 plexmoviemedia
root@couchpotato_1:/media #

and
Code:
root@couchpotato_1:/media # ls -l download_cache/
total 0


itchiTriGgeR,
I've set up a new CP install following your guide which was more or less the same stuff I already did and CP would never snatch torrents, so I just shut that plugin off and am back to my existing one. I never see a point where you assign mount points within the jail and set up permissions for your folders and plugins.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
@ninjai
I reread your earlier post and realized I didn't understand the issue exactly. your permission errors are happening in transmission, which is the plugin that needs write permissions to any download directories.
 

ninjai

Explorer
Joined
Apr 6, 2015
Messages
98
I think I'm confused on how transmission works with CP to gain write access to the attached storage. It works fine with SickRage but not CP, why would that be?

If I made the transmission service run under my username, similar to what I've done in the other 2 jails (sickrage and CP), would that resolve it?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I think I'm confused on how transmission works with CP to gain write access to the attached storage. It works fine with SickRage but not CP, why would that be?

If I made the transmission service run under my username, similar to what I've done in the other 2 jails (sickrage and CP), would that resolve it?
both transmission and SR/CP need write access to the download folders. transmission does the downloading, then passes the job to SR/CP to post-process.

yes, changing transmissions user is what I always do. 'solution 1' from the permission thread that was linked. follow that for transmission and it should work.
 

ninjai

Explorer
Joined
Apr 6, 2015
Messages
98
OK thanks. Wondering if you can clear up some more confusion then.

If I'm in my couchpotato jail, and I use "add storage" to mount a folder that is owned by user2, but within the jail I chown that mount point (EG: /media/downloads) to user2, does it actually change the ownership to user2 if I were to browse to it within freenas, outside the jail?

Right now I have my user running all the processes and owning all the data. I think its a bit of a clunky solution and I think I need to make a group do this instead. Groups in unix have always eluded me though.

So in SickRage, it hands the download off to tranmission, but I think sickrage launches that task and therefore uses the permissions inside sickrage. Why is it I have no problems writing to the same folder when using SR and Transmission, but if I use CP and tranmission, I can't write to it? Is it because CP actually does, as you say, hand over the task to transmission, and SR does not?

I also don't understand how Transmission would even know about the mount point because I have no mount points inside transmission's plugin, just in CP.

EDIT:

I just switched transmission to run as the same user I have CP and SickRage running as... and still get permission denied :(
 
Last edited:

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
OK thanks. Wondering if you can clear up some more confusion then.

If I'm in my couchpotato jail, and I use "add storage" to mount a folder that is owned by user2, but within the jail I chown that mount point (EG: /media/downloads) to user2, does it actually change the ownership to user2 if I were to browse to it within freenas, outside the jail?

Right now I have my user running all the processes and owning all the data. I think its a bit of a clunky solution and I think I need to make a group do this instead. Groups in unix have always eluded me though.
yes, the files will be changed no matter where they are being accessed from. the facts section of the permission thread tries to layout who this works.

having everything run as your user is fine, but you could also just use the programs default user and have the files world read/writable by setting the permission levels in SR/CP/transmission configs.
 

ninjai

Explorer
Joined
Apr 6, 2015
Messages
98
yes, the files will be changed no matter where they are being accessed from. the facts section of the permission thread tries to layout who this works.

having everything run as your user is fine, but you could also just use the programs default user and have the files world read/writable by setting the permission levels in SR/CP/transmission configs.
OK well I'm stumped now. I've got the transmission process in the jail running as my user now by editing rc.conf. Same permission error. Not sure how to proceed.
 

ninjai

Explorer
Joined
Apr 6, 2015
Messages
98
Well I'm not sure what I did but I got it working.

I did a couple things after doing the above:

I changed the mount point /media/download_cache to /media/transmission_downloads (which is what it's called in SR and transmission)

It didn't work after doign this either, because inside CP I needed to change the transmission download location from /media/transmission_downloads/couchpotato to /media/transmission_downloads.

Now it's working fine.
couch1.PNG
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Sounds like there path transmission was reporting to couch potato was different that the path couch potato was using
 

ninjai

Explorer
Joined
Apr 6, 2015
Messages
98
Yup, that's what it sounds like.

I'm still having trouble grasping how paths work with jail mountpoints. I mean transmission is a client. Like transmission on a linux OS, you open the torrent with the client, and choose the destination.

With the web front end, I wasn't sure if SR/CP were leveraging transmission for the torrent portion of the task, and using the SR/CP mountpoints as the destination paths (because that's what the front ends of CP/SR would let me navigate to).

Does that make sense?

In reality though, transmission needed the same mountpoints as SR and CP.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Yup, that's what it sounds like.

I'm still having trouble grasping how paths work with jail mountpoints. I mean transmission is a client. Like transmission on a linux OS, you open the torrent with the client, and choose the destination.

With the web front end, I wasn't sure if SR/CP were leveraging transmission for the torrent portion of the task, and using the SR/CP mountpoints as the destination paths (because that's what the front ends of CP/SR would let me navigate to).

Does that make sense?

In reality though, transmission needed the same mountpoints as SR and CP.
they need the same paths because transmission is told to write it to a certain location from CP, then CP looks in that location. if that location are different depending on which jail you're in the files won't be where they're expected.

it's pretty complicated. I prefer the way I do it, and have documented on my blog. all related plugins (sabnzbd/transmission/SR/CP) run in the same jail, run as the same user. makes things simpilier in my opinion.
 
Status
Not open for further replies.
Top