Sonarr won't move downloaded files

ChiknNutz

Patron
Joined
Nov 6, 2015
Messages
217
Has something changed in FreeNAS? I've been happily using SAB, Radarr and Sonarr for some time now. About a week ago, SAB crapped out on me for no apparent reason. I tried to upgrade it, never could get it to work. Moved on to NZBget, finally got it working. Now having the same f'n permission issues with Sonarr and Radarr I fought thru quite a while ago. Nothing changed in Sonarr or Radarr, but now it has issues moving the files from the downloads to the final folder, keeps saying "Access to the path is denied" in the Log files. Only way I can get it to work is to manually go into the jail and run, "chown -R media:media /media" EVERY SINGLE TIME a new file is dropped in. It acts like the permissions get wiped out on the folder with every new file that's added. What the heck is going on? I've been using FreeNAS for like 5 years now, but I find it really frustrating constantly fighting permission issues.
 

styno

Patron
Joined
Apr 11, 2016
Messages
466
@ChiknNutz : when you installed NZBget did you create a user called 'media' with the same UID as in use before? And more importantly, check if NZBget is running as that user.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
@ChiknNutz : when you installed NZBget did you create a user called 'media' with the same UID as in use before? And more importantly, check if NZBget is running as that user.
That works but what you should do is create a group media and add the NZBget user to that group. This would follow the best practices for user management.
 

ChiknNutz

Patron
Joined
Nov 6, 2015
Messages
217
That works but what you should do is create a group media and add the NZBget user to that group. This would follow the best practices for user management.

Okay, getting closer. Here are the various permissions I've done so far. The syrsc finally seems to have done the trick with allowing Sonarr to move the files.
Code:
pw groupadd -n media -g 816
pw groupmod media -m media
pw useradd -n media -u 816 -d /nonexistent -s /usr/sbin/nologin
sysrc 'nzbget_user=media'

After doing so, however, I was unable to modify the NZBget config file (/usr/local/etc/nzbget.conf) as I assume this change in permissions altered the user necessary to make the changes. I was able to rectify that with:
Code:
chown -R media:media /usr/local/etc
 
Last edited:

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Okay, getting closer. Here are the various permissions I've done so far. The syrsc finally seems to have done the trick with allowing Sonarr to move the files.
Code:
pw groupadd -n media -g 816
pw groupmod media -m media
pw useradd -n media -u 816 -d /nonexistent -s /usr/sbin/nologin
sysrc 'nzbget_user=media'

After doing so, however, I was unable to modify the NZBget config file (/usr/local/etc/nzbget.conf) as I assume this change in permissions altered the user necessary to make the changes. I was able to rectify that with:
Code:
chown -R media:media /usr/local/etc
Nope don't do that. All you need to do is create a new group with whatever gid matches the gid in other jails and on the base freenas system. Then add your users to that group, do not make it their primary group. The sysrc made it so your service is running as the media user which you don't want.
 

ChiknNutz

Patron
Joined
Nov 6, 2015
Messages
217
Well too late now...oops. I had already applied the first three permissions which still wasn't working right (hence my post). I just did the "sysrc" bit as of my previous post which did make it all work. It is now working but if this is NOT the appropriate way to go about it (by having the nzbget service run as media), I don't know how to revert it back. I've seen the general 4 methods for permissions but always seem to have to futz around with them to get it all to work properly.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Well too late now...oops. I had already applied the first three permissions which still wasn't working right (hence my post). I just did the "sysrc" bit as of my previous post which did make it all work. It is now working but if this is NOT the appropriate way to go about it (by having the nzbget service run as media), I don't know how to revert it back. I've seen the general 4 methods for permissions but always seem to have to futz around with them to get it all to work properly.
Could just break any kind of upgrade or something you haven't noticed. Permissions with jails are super simple is just a bunch of idiots on the internet giving bad advice that makes it hard.
 
Top