SabNZBD permissions

Status
Not open for further replies.

28061

Contributor
Joined
Oct 13, 2014
Messages
120
Evening all,
I'm a bit of a newbie to Freenas & I've never used anything other than Windows before but I've not done so bad so far so please bare with me!

I've installed Freenas & seem to have configured it ok so far with usable windows permissions. I'm just waiting for my gigabit switch before I transfer my 8TB of data across to it...

I've installed the SabNZBD plug in and configured the storage, which is mounted. However, upon starting SabNZBD it keeps repeating the following:
download_dir directory: /var/db/sabnzbd/Downloads/incomplete does not exist, try to create it
2015-02-03 21:14:41,344::ERROR::[misc:394] Cannot create directory /var/db/sabnzbd/Downloads/incomplete

I assume it's a permissions issue, but can't figure it out. I think I've 777'd everything, but created a group called everyone, added all the users as members, and then created full permissions for that user on the route of my dataset anyway.

Thanks guys - looks superb so far!
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
by default, sabnzbd' default user 'media' (UID 816) owns everything in the /var/db/sabnzbd directory and this should work.

did you mount storage into the jail or change the ownership/permissions of any folders inside /var/db/sabnzbd?
 

28061

Contributor
Joined
Oct 13, 2014
Messages
120
Thanks Josh for your quick response.

by default, sabnzbd' default user 'media' (UID 816) owns everything in the /var/db/sabnzbd directory and this should work.
I can't find the user media and when I followed instructions on another blog (ran ID Sabnzbd cmd inside the jail) it stated the user was root & group was wheel...

did you mount storage into the jail or change the ownership/permissions of any folders inside /var/db/sabnzbd?

Yes, the jail storage is mounted, is not read only, SRC="/mnt/DataPool/WinShare/Downloads" Dest="/var/db/sabnzbd/Downloads".

I might have altered the permissions inside var/db/sabnzbd by accident when I changed the permissions in my datapool and selected recursive changes (Jails are stored inside the dataset aren't they?)
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
OK makes sense to me. the storage you mounted isn't writable by the media user which the sabnzbd plugin runs as by default.

jails/plugins are on their own dataset, you basically have one dataset virtually ontop of another when you mount storage into your jail. you are doing everything correct so far, just chose a solution from here. I think 1 or 4 would be easiest.
https://forums.freenas.org/index.ph...plugins-write-permissions-to-your-data.27336/
 

28061

Contributor
Joined
Oct 13, 2014
Messages
120
OK makes sense to me. the storage you mounted isn't writable by the media user which the sabnzbd plugin runs as by default.

jails/plugins are on their own dataset, you basically have one dataset virtually ontop of another when you mount storage into your jail. you are doing everything correct so far, just chose a solution from here. I think 1 or 4 would be easiest.
https://forums.freenas.org/index.ph...plugins-write-permissions-to-your-data.27336/

I used solution 1 - worked immediately, thank you. I'm surprised that the user wasn't created by default - I assumed it would have been when I installed the plug in via the GUI. Or maybe it did and I messed it up somewhere else. Thanks Josh - great help.

Hopefully my switch will arrive tomorrow and I can finish CouchPotato and SickBeard!
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Glad you got it working.

As I state in the guide user/group databases from the jail and FreeNAS aren't shared. the plugin doesn't create a user in FreeNAS, only the jail.
 

28061

Contributor
Joined
Oct 13, 2014
Messages
120
That makes sense - thank you for explaining it. Would you mind helping me with another issue please? - I've got Sab, CouchPotato & Sickbeard all installed and configured with the exception that I can't get the SabToSickBeard script to work.

The first error was
env: python: No such file or directory
Reading through other posts, I changed the first line of SabToSickBeard.py from
#!/usr/bin/env python#
to
#!/usr/bin/python#
which changed the error to
Cannot run script /scripts/sabToSickBeard.py

As I created the scripts folder in a windows browser, I re-applied the permissions recursively for the media user, but the same error persists. I'm confident that the AutoProcessTv.cfg is configured correctly & don't know what to do next.

I understand the two apps are in different jails and don't have access to each others files, but the script appears to communicate via web interface - which works fine for download handling...

SAB log is unremarkable, stating just:
Unrar finished on /var/db/sabnzbd/Downloads/incomplete/Gotham.S01E13.720p.HDTV.X264-DIMENSION
2015-02-04 09:33:16,408::INFO::[postproc:353] unpack_magic finished on Gotham.S01E13.720p.HDTV.X264-DIMENSION
2015-02-04 09:33:16,409::INFO::[newsunpack:150] Running external script /scripts/sabToSickBeard.py(/var/db/sabnzbd/Downloads/complete/TV/Gotham.S01E13.720p.HDTV.X264-DIMENSION.2, Gotham.S01E13.720p.HDTV.X264-DIMENSION.nzb, Gotham.S01E13.720p.HDTV.X264-DIMENSION, , tv, alt.binaries.warez, 0, )
2015-02-04 09:33:16,484::INFO::[downloader:667] Thread 11@news.eu.supernews.com:563: forcing disconnect
2015-02-04 09:33:16,585::INFO::[downloader:667] Thread 13@news.eu.supernews.com:563: forcing disconnect
2015-02-04 09:33:16,686::INFO::[downloader:667] Thread 9@news.eu.supernews.com:563: forcing disconnect
2015-02-04 09:33:16,787::INFO::[downloader:667] Thread 7@news.eu.supernews.com:563: forcing disconnect
2015-02-04 09:33:16,888::INFO::[downloader:667] Thread 15@news.eu.supernews.com:563: forcing disconnect
2015-02-04 09:33:16,989::INFO::[downloader:667] Thread 18@news.eu.supernews.com:563: forcing disconnect
2015-02-04 09:33:17,090::INFO::[downloader:667] Thread 4@news.eu.supernews.com:563: forcing disconnect
2015-02-04 09:33:17,127::INFO::[postproc:543] Cleaning up Gotham.S01E13.720p.HDTV.X264-DIMENSION (keep_basic=False)
2015-02-04 09:33:17,128::INFO::[__init__:908] /var/db/sabnzbd/Downloads/incomplete/Gotham.S01E13.720p.HDTV.X264-DIMENSION/__ADMIN__/SABnzbd_nzf_J4H8Wn removed
2015-02-04 09:33:17,128::INFO::[__init__:908] /var/db/sabnzbd/Downloads/incomplete/Gotham.S01E13.720p.HDTV.X264-DIMENSION/__ADMIN__/SABnzbd_nzf_inMUgZ removed
2015-02-04 09:33:17,128::INFO::[__init__:908] /var/db/sabnzbd/Downloads/incomplete/Gotham.S01E13.720p.HDTV.X264-DIMENSION/__ADMIN__/SABnzbd_nzf_paQX6L removed
2015-02-04 09:33:17,128::INFO::[__init__:908] /var/db/sabnzbd/Downloads/incomplete/Gotham.S01E13.720p.HDTV.X264-DIMENSION/__ADMIN__/SABnzbd_nzf_V8DNlG removed
2015-02-04 09:33:17,128::INFO::[__init__:908] /var/db/sabnzbd/Downloads/incomplete/Gotham.S01E13.720p.HDTV.X264-DIMENSION/__ADMIN__/SABnzbd_nzf_AFSYe3 removed
2015-02-04 09:33:17,128::INFO::[__init__:908] /var/db/sabnzbd/Downloads/incomplete/Gotham.S01E13.720p.HDTV.X264-DIMENSION/__ADMIN__/SABnzbd_nzf_vLcq2n removed
2015-02-04 09:33:17,128::INFO::[__init__:908] /var/db/sabnzbd/Downloads/incomplete/Gotham.S01E13.720p.HDTV.X264-DIMENSION/__ADMIN__/SABnzbd_nzf_gQ6x2I removed
2015-02-04 09:33:17,129::INFO::[__init__:908] /var/db/sabnzbd/Downloads/incomplete/Gotham.S01E13.720p.HDTV.X264-DIMENSION/__ADMIN__/SABnzbd_nzf_tuS8as removed
2015-02-04 09:33:17,129::INFO::[__init__:908] /var/db/sabnzbd/Downloads/incomplete/Gotham.S01E13.720p.HDTV.X264-DIMENSION/__ADMIN__/SABnzbd_nzf_uFCX25 removed
2015-02-04 09:33:17,129::INFO::[postproc:85] Saving postproc queue
2015-02-04 09:33:17,130::INFO::[__init__:919] Saving data for postproc1.sab in /var/db/sabnzbd/admin/postproc1.sab
2015-02-04 09:33:17,130::INFO::[downloader:246] Post-processing finished, resuming download
2015-02-04 09:33:17,191::INFO::[downloader:667] Thread 5@news.eu.supernews.com:563: forcing disconnect
2015-02-04 09:33:17,292::INFO::[downloader:667] Thread 19@news.eu.supernews.com:563: forcing disconnect
2015-02-04 09:33:17,393::INFO::[downloader:667] Thread 8@news.eu.supernews.com:563: forcing disconnect
2015-02-04 09:33:18,131::INFO::[nzbqueue:218] Saving queue
2015-02-04 09:33:18,131::INFO::[__init__:919] Saving data for queue9.sab in /var/db/sabnzbd/admin/queue9.sab
2015-02-04 09:33:18,131::INFO::[__init__:919] Saving data for totals9.sab in /var/db/sabnzbd/admin/totals9.sab
2015-02-04 09:33:18,131::INFO::[__init__:919] Saving data for rss_data.sab in /var/db/sabnzbd/admin/rss_data.sab
2015-02-04 09:33:18,132::INFO::[__init__:919] Saving data for bookmarks.sab in /var/db/sabnzbd/admin/bookmarks.sab
2015-02-04 09:33:18,132::INFO::[__init__:919] Saving data for Rating.sab in /var/db/sabnzbd/admin/Rating.sab
2015-02-04 09:33:18,132::INFO::[__init__:919] Saving data for watched_data.sab in /var/db/sabnzbd/admin/watched_data.sab
2015-02-04 09:33:18,132::INFO::[postproc:85] Saving postproc queue
2015-02-04 09:33:18,132::INFO::[__init__:919] Saving data for postproc1.sab in /var/db/sabnzbd/admin/postproc1.sab
2015-02-04 09:33:18,132::INFO::[postproc:677] Queue has finished, launching: None (None)


Edit: Added Sab log & changed formatting of post
 
Last edited:

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
That makes sense - thank you for explaining it. Would you mind helping me with another issue please? - I've got Sab, CouchPotato & Sickbeard all installed and configured with the exception that I can't get the SabToSickBeard script to work.

The first error was Reading through other posts, I changed the first line of SabToSickBeard.py from to which changed the error to

As I created the scripts folder in a windows browser, I re-applied the permissions recursively for the media user, but the same error persists. I'm confident that the AutoProcessTv.cfg is configured correctly & don't know what to do next.

I understand the two apps are in different jails and don't have access to each others files, but the script appears to communicate via web interface - which works fine for download handling...

SAB log is unremarkable, stating just:


Edit: Added Sab log & changed formatting of post
I don't recommend you change the script, the recommendation you are reading is for linux.

what you should do in your sabnzbd jail is
Code:
pkg install python
 

28061

Contributor
Joined
Oct 13, 2014
Messages
120
I don't recommend you change the script, the recommendation you are reading is for linux.

what you should do in your sabnzbd jail is
Code:
pkg install python
Oh man, I feel like such a newb... I couldn't get it to work - I got an error RE permissions too lax, so I followed the instructions here which enabled me to run pkg install python, but after which the plugins won't start, stating
sickbeard_1 su: pam_start: system error
in openpam_check_desc_owner_perms(): etc/pam/.d/su: insecure ownership or permissions

I tried to reverse the instructions in the link, replacing root:wheel with SabNZBD:Auto_Downloaders but I'm now getting illegal group\user name errors.

I've double checked the user\group details - ensuring that it uses userid 816 and that SabNZBD does indeed belong to Auto_Downloaders - which it does.

As you can see, I'm trying to figure it out elsewhere - I'm trying not to keep asking honest!
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Oh man, I feel like such a newb... I couldn't get it to work - I got an error RE permissions too lax, so I followed the instructions here which enabled me to run pkg install python, but after which the plugins won't start, stating

I tried to reverse the instructions in the link, replacing root:wheel with SabNZBD:Auto_Downloaders but I'm now getting illegal group\user name errors.

I've double checked the user\group details - ensuring that it uses userid 816 and that SabNZBD does indeed belong to Auto_Downloaders - which it does.

As you can see, I'm trying to figure it out elsewhere - I'm trying not to keep asking honest!
never change the ownership/permissions of your jail/plugin datasets, only of datasets that contain your media/files that you mount into your jail(s). you're going to need to delete those plugins/jails and reinstall them.

maybe you should try the steps on my blog (Google jruehlig freenas)? my method installs sabnzbd+transmission+sickrage+couchpotato in the same jail using nzbToMedia for script post-processing.
 

28061

Contributor
Joined
Oct 13, 2014
Messages
120
:eek: Oh man I've made such a mess of this... I don't even know what I've done...

Over the last few days, I've deleted more jails and plugins than I can wave a ruddy stick at. I've also reinstalled Freenas twice with clean installs - and absolutely bricked myself the second time when it didn't give me the opportunity to import my volume, after moving all of my data to it. (It did give me the opportunity after a reboot).

I thought I had it sorted - had all three services running in one jail, but couldn't get the SAB GUI to save changes to folders that pointed at jail storage locations. I think I then changed the owner of the jail to media (Then realising I'd done what you told me not to above) - that enabled me to save the changes to the folders but I lost control of service start\stop. In a moment of uncontrolled panic, I deleted some other stuff (templates and jail datasets I think), with the intention that when I recreated them, they'd all be nice & clean - a fresh start if you will!

Plugins->SabNzbd->Install->40 minute wait->Still says "(4/4) Installing plugin"

I think I was pretty close - right up until I ballsed up the permissions and panicked. Where do you suggest I go from here?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
:eek: Oh man I've made such a mess of this... I don't even know what I've done...

Over the last few days, I've deleted more jails and plugins than I can wave a ruddy stick at. I've also reinstalled Freenas twice with clean installs - and absolutely bricked myself the second time when it didn't give me the opportunity to import my volume, after moving all of my data to it. (It did give me the opportunity after a reboot).

I thought I had it sorted - had all three services running in one jail, but couldn't get the SAB GUI to save changes to folders that pointed at jail storage locations. I think I then changed the owner of the jail to media (Then realising I'd done what you told me not to above) - that enabled me to save the changes to the folders but I lost control of service start\stop. In a moment of uncontrolled panic, I deleted some other stuff (templates and jail datasets I think), with the intention that when I recreated them, they'd all be nice & clean - a fresh start if you will!

Plugins->SabNzbd->Install->40 minute wait->Still says "(4/4) Installing plugin"

I think I was pretty close - right up until I ballsed up the permissions and panicked. Where do you suggest I go from here?
I'd just delete your plugins+jail, and jail datasets. Then start from there.

It should take a long time cause it probably has to redownload and extract the jail template again, but 40mins seems too long.
 

28061

Contributor
Joined
Oct 13, 2014
Messages
120
Ok, thanks Josh - I'm back on the right track & nearly there I think!

I've got Sab, Sickbeard & Couch installed in one jail. All services run & they allow me to save changes to the folders.

However, I'm still getting permission errors including this from sickbeard:

2015-02-08 12:05:12 SHOWQUEUE-ADD :: Failed to set permission for /media/TV/An Idiot Abroad/season03-poster.jpg to 664

This is normally the point I mess it up! Last time, before I did something daft, your solution 1 worked fine but I can't remember which dataset listing to change the owner to. My datasets are shown in the picture below.

Storage.jpg


Josh I'm sorry, but would you mind explaining it from this point onwards - in really stupid steps that I couldn't possibly balls up!?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Is your jail mountpoint /mnt/Pool1/WinShare > /mnt/TV?
If so, set the ownership of the Pool1/WinShare dataset to the media (UID=816) user.
 

28061

Contributor
Joined
Oct 13, 2014
Messages
120
Is jail mount point the same as jail root in jails->configuration? If so, mine is currently "/mnt/Pool1/jails".

On the plus side, something is working well because SickBeard has already found loads of episodes I've missed during my data migration - which have been passed to Sab, downloaded and placed in my library!
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Is jail mount point the same as jail root in jails->configuration? If so, mine is currently "/mnt/Pool1/jails".

On the plus side, something is working well because SickBeard has already found loads of episodes I've missed during my data migration - which have been passed to Sab, downloaded and placed in my library!
No... to me it sounds like you didn't really follow my blog exactly and skipped steps.
You don't have a media dataset and you are confused about mounting that dataset into your jail. Mounting a dataset into your jail is covered in the freenas docs.
 

28061

Contributor
Joined
Oct 13, 2014
Messages
120
Apologies - I'm still getting used to terminology. Is this what you mean?
JailStorage.jpg


EDIT: Added: Ah, I think I understand. My dataset isn't exclusively for media so I've used a jail storage to mount into the media directory....
 
Last edited:

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Yup, that's mounting your dataset into your jail. Here's some comments on your setup
  • if you followed my blog (which you obviously changed some things) your tv/movies would be downloading to /mnt/media/downloads in the jail. media would be cleaned up, renamed, and organized in /mnt/media/videos. If this is how you set it up your not actually using your "WinShare" dataset mounted into the jail, just some folders inside of your jail dataset.
  • I don't recommend you mount separate folders (Media and Downloads) into the jail. Your jail won't be able to efficiently move files from one mointpoint to another, it will have to do a read+write+delete operation instead of a metadata only move.
 

28061

Contributor
Joined
Oct 13, 2014
Messages
120
Ok, thanks Josh - appreciate your help & I understand. If I'm honest, I struggled to follow your blog, partially because its for transmission\SickRage & not couch\SickBeard & partially because I got a couple of errors at the Git clone stage that prevented me from progressing - although it's possible because my file structure is different. Although I'm sure it doesn't seem like it - I'm trying to avoid asking too many questions!

As my jails largely seem to be working ok (bar the metadata, which I can let my XBMC client worry about), your saying I'd be better of deleting my Jail Storage and adding a CIFS share just for media for use with the plugins because this would allow just one jail storage and increase efficiency.

Assumedly, because I'd then have a dataset\share just for media use, there would be no consequences of me settings the owner as the user media - which is what you told me to do earlier.

Am I getting closer?!
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
No, I do not recommend using CIFS to mount data into your jail. I never even mention CIFS

I'm just saying..
  • the videos sickbeard is downloading may not actually be ending up on your WinShare dataset (I'm not sure cause you never told me where it's downloading/organizing media to)
  • you shouldn't have multiple jail storage mounts into your jail from the same dataset in this case, it's not as efficient
I recommend you figure out how you are going to mount your dataset into the jail, and configure sickbeard to use that mountpoint.
This is how I do it..
/mnt/tank/media > /mnt/media (My media dataset has a videos and downloads folders.)

####
Not sure if you're closer, seems like you are trying a bunch of things, you might eventually have something you're happy with.
I can setup the steps in my blog in a few minutes so close is relative.
 
Status
Not open for further replies.
Top