Sonarr/SAB setup

lyle

Contributor
Joined
Jul 30, 2013
Messages
123
Everything is working smoothly EXCEPT: Sonarr will not do the post-processing. It seems to be a permissions issue as the logs show that it knows the download file is there, but can't access it. "Access to the path is denied"

On the Sonarr forum, it was suggested that the the jail mounts need to be identical for both Sonarr & SAB.

Currently for both jails the Source directory is the same:

/mnt/Main_server/Media

But, the Destination directories are different:

/mnt/Main_server/iocage/jails/sonarr/root/media
/mnt/Main_server/iocage/jails/sabnzbd/root/media

However, I can't make the Destination directories the same using the GUI. It starts at /mnt/Main_server/iocage/jails/sabnzbd/root/ (or .../sonarr/root) and doesn't let me move up the tree.

Am I on the right track here do you think? Is there a way to make the Destination directories the same?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
It's not the mount paths that matter as long as each application is pointed to the right path in its own jail.

The same path for completed downloads needs to be visible to both jails (maybe it makes sense to have them at the same path in each jail, but it's not something that will stop it from working).

What is most important is that the permissions for that path has the same owner with the same UID in both jails.
 

lyle

Contributor
Joined
Jul 30, 2013
Messages
123
Thanks for the reply!

>>>The same path for completed downloads needs to be visible to both jails

This is the part I think I'm stuck on. I'm not sure how to do that.

>>>What is most important is that the permissions for that path has the same owner with the same UID in both jails.

In the jail properties the "exec jail user" and "exec system jail user" is "root" for both jails. I've double checked in Windows that my folders "/Media/NZB/Completed" and the various "/Media/TV/shows" folders have given "root" full security access.

Still no joy!
 

lyle

Contributor
Joined
Jul 30, 2013
Messages
123
Can anyone point me in the right direction?
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
This thread explains the options.
I have the user media installed in my jails and change the user the jail runs as to media. Option 2.
In the jail
Code:
pw user add media -c media -u 8675309  -d /nonexistent -s /usr/bin/nologin
chown -R media:media /mnt/Main_server/Media 
sysrc sabnzbd_user="media"
 

lyle

Contributor
Joined
Jul 30, 2013
Messages
123
Thanks for getting back to me. It's making somewhat more sense for me know. The shell intimidates me, don't know why we can't do this in the gui.

Ok, on the second line of code I get his error:

root@sabnzbd:~# chown -R media:media /mnt/Main_server/Media
chown: /mnt/Main_server/Media: No such file or directory

I double checked my mount point and it is definitely /mnt/Main_server/Media

Can you provide further assistance to a hapless noob?
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
You probably have the mount point messed up so it's not finding it to change the permission of that directory. Post the output of this command iocage fstab -l sabnzbd It must be run from the shell in base freenas not the jail. Post the output in code blocks see the dropdown next to the smiley face.
 

lyle

Contributor
Joined
Jul 30, 2013
Messages
123
Thanks, NasKar, here is my output:

Code:
| INDEX |                                                                    FSTAB ENTRY         +===================================================================================================================================================+
| 0     | /mnt/Main_server/iocage/releases/11.3-RELEASE/root/bin  /mnt/Main_server/iocage/jails/sabnzbd/root/bin  nullfs  ro      0       0                 |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| 1     | /mnt/Main_server/iocage/releases/11.3-RELEASE/root/boot /mnt/Main_server/iocage/jails/sabnzbd/root/boot nullfs  ro      0       0                 |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| 2     | /mnt/Main_server/iocage/releases/11.3-RELEASE/root/lib  /mnt/Main_server/iocage/jails/sabnzbd/root/lib  nullfs  ro      0       0                 |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| 3     | /mnt/Main_server/iocage/releases/11.3-RELEASE/root/libexec      /mnt/Main_server/iocage/jails/sabnzbd/root/libexec      nullfs  ro      0       0 |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| 4     | /mnt/Main_server/iocage/releases/11.3-RELEASE/root/rescue       /mnt/Main_server/iocage/jails/sabnzbd/root/rescue       nullfs  ro      0       0 |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| 5     | /mnt/Main_server/iocage/releases/11.3-RELEASE/root/sbin /mnt/Main_server/iocage/jails/sabnzbd/root/sbin nullfs  ro      0       0                 |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| 6     | /mnt/Main_server/iocage/releases/11.3-RELEASE/root/usr/bin      /mnt/Main_server/iocage/jails/sabnzbd/root/usr/bin      nullfs  ro      0       0 |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| 7     | /mnt/Main_server/iocage/releases/11.3-RELEASE/root/usr/include  /mnt/Main_server/iocage/jails/sabnzbd/root/usr/include  nullfs  ro      0       0 |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| 8     | /mnt/Main_server/iocage/releases/11.3-RELEASE/root/usr/lib      /mnt/Main_server/iocage/jails/sabnzbd/root/usr/lib      nullfs  ro      0       0 |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| 9     | /mnt/Main_server/iocage/releases/11.3-RELEASE/root/usr/libexec  /mnt/Main_server/iocage/jails/sabnzbd/root/usr/libexec  nullfs  ro      0       0 |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| 10    | /mnt/Main_server/iocage/releases/11.3-RELEASE/root/usr/sbin     /mnt/Main_server/iocage/jails/sabnzbd/root/usr/sbin     nullfs  ro      0       0 |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| 11    | /mnt/Main_server/iocage/releases/11.3-RELEASE/root/usr/share    /mnt/Main_server/iocage/jails/sabnzbd/root/usr/share    nullfs  ro      0       0 |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| 12    | /mnt/Main_server/iocage/releases/11.3-RELEASE/root/usr/libdata  /mnt/Main_server/iocage/jails/sabnzbd/root/usr/libdata  nullfs  ro      0       0 |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| 13    | /mnt/Main_server/iocage/releases/11.3-RELEASE/root/usr/lib32    /mnt/Main_server/iocage/jails/sabnzbd/root/usr/lib32    nullfs  ro      0       0 |



There was a 14th line that refused to copy:

1586876630301.png
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
So you have mounted the /mnt/Main_server/Media directory in the jail as /media

root@sabnzbd:~# chown -R media:media /mnt/Main_server/Media
chown: /mnt/Main_server/Media: No such file or directory
This makes total sense in that context as you're in the jail (root@sabnzbd), telling it to look for the path that only your host can see.

Try chown -R media:media /media instead
 

lyle

Contributor
Joined
Jul 30, 2013
Messages
123
OK, so should the code that Nas gave me in post #5 have been entered at the root? Just before the code, he wrote "In the jail", which made me think the code had to be entered while in the jail.
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
Your mount point in the jail for media is /media outside the jail it is /mnt/Main_server/Media. This is case sensative. So in the jail the command would be chown -R media:media /media outside the jail in base Freenas it would be chown -R media:media /mnt/Main_server/Media
Your not understanding what mapping the storage to the jail does. Your putting whatever is in /mnt/Main_server/Media and putting it in the jail under the directory /media
 

lyle

Contributor
Joined
Jul 30, 2013
Messages
123
a-ha, finally got it! <<sound of penny dropping into slot>> Thanks for your patience, guys. Mucho appreciated!!!

Am I wrong to think this is something basic that the plugin should have sorted out? Or do you think I messed up the plugin install? I am tempted to delete the plugins and jails and start fresh to reinforce the learning.
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I don't use plugins so I can't say but I thing the jails are better and you can update them whenever you want.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Am I wrong to think this is something basic that the plugin should have sorted out?
Yes, you are wrong... plugins don't automatically select mounted directories and fix permissions in them.
 
Top