Jail Permission error with Sonarr

palmy99999

Cadet
Joined
Oct 1, 2017
Messages
6
Hi All,

I have a permissions issue whereby Sonarr doesn't not have write permissions to either the dataset or perhaps there is a jail permission issue (I'm not sure which it is).

version FreeNAS-11.0-U3 (c5dcf4416)

The system was @ version 9.3 before my USB key died, after which I upgraded to Corral, imported the ZFS volume, then gave up on Corral after having issues with the Docker stopping constantly, installed version 11 and imported the ZFS volume again and started again.

I've been searching for a resolution to the following error but yet to find anything that has resolved the issue for me:

Import failed, path does not exist or is not accessible by Sonarr: /media/Entertainment/downloads/sabnzbd/complete/tv/<filename>

Permissions on my dataset appear to be correct:
upload_2017-10-2_12-52-51.png


Output of the command ls -l :
upload_2017-10-2_13-3-6.png


Sonarr, SABNZBD and CouchPotato all run under the media user and group and the UID and GID match between the Jails and FreeNAS dataset permissions.

Sonarr jail has the following storage:

upload_2017-10-2_13-1-14.png


Not sure what other information is useful to help troubleshoot this but please let me know if you can assist.

Thanks in advance.
 

Attachments

  • upload_2017-10-2_13-2-52.png
    upload_2017-10-2_13-2-52.png
    10.8 KB · Views: 378

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
How did you mount the storage in the jail? Got a screenshot of that page?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
That looks kind of odd--/mnt/DATA/Entertainment is mounted at /media/Entertainment, but /mnt/DATA/Entertainment/TV Shows is mounted at /media/TV. Is TV Shows its own dataset? If not, I'd delete that storage mountpoint entirely. If it is, it would probably make more sense to have it at /media/Entertainment/TV.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
So in your jail the path sonarr is complaining about doesn't exist. You need to make it exist and be the location you want to import your media to. /media/TV is the path in the jail not /media/Entertainment/downloads/sab
 

palmy99999

Cadet
Joined
Oct 1, 2017
Messages
6
That looks kind of odd--/mnt/DATA/Entertainment is mounted at /media/Entertainment, but /mnt/DATA/Entertainment/TV Shows is mounted at /media/TV. Is TV Shows its own dataset? If not, I'd delete that storage mountpoint entirely. If it is, it would probably make more sense to have it at /media/Entertainment/TV.

Thanks, it's not it's own dataset, I now recall why I added this. I was having trouble adding TV Shows to Sonarr, and after trying to add the path directly it worked, I forgot to remove it, but essentially when I had it at /mnt/DATA/Entertainment, Sonarr didn't have perms to write to the /TV Shows/ folder. I'll delete it and try again.
 

palmy99999

Cadet
Joined
Oct 1, 2017
Messages
6
So in your jail the path sonarr is complaining about doesn't exist. You need to make it exist and be the location you want to import your media to. /media/TV is the path in the jail not /media/Entertainment/downloads/sab

SABNZBD doesn't download to /TV Shows, that's the post-processing complete dir so I'll need to remove it I think as above. :)
 

palmy99999

Cadet
Joined
Oct 1, 2017
Messages
6
After removing /media/TV and getting the same error, I still think there is a permissions issue. Permissions on the folder 'downloads':

upload_2017-10-3_9-41-39.png



Yet on the files within the newly downloaded show, the permissions are different:

upload_2017-10-3_9-44-10.png
 

palmy99999

Cadet
Joined
Oct 1, 2017
Messages
6
Tried to edit above post but it wouldn't let me:


EDIT: More info from Sonarr log:

Couldn't import episode /media/Entertainment/downloads/sabnzbd/complete/tv/<New Download Folder Name> /<New file Name>: Access to the path is denied.



System.UnauthorizedAccessException: Access to the path is denied.
at System.IO.File.Move (System.String sourceFileName, System.String destFileName) [0x0013a] in /usr/wrkdirprefix/usr/ports/lang/mono/work/mono-3.10.0/mcs/class/corlib/System.IO/File.cs:319
at NzbDrone.Common.Disk.DiskProviderBase.MoveFile (System.String source, System.String destination, Boolean overwrite) [0x000e3] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Common\Disk\DiskProviderBase.cs:222
at NzbDrone.Common.Disk.DiskTransferService.TryMoveFileVerified (System.String sourcePath, System.String targetPath, Int64 originalSize) [0x00000] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Common\Disk\DiskTransferService.cs:565
 

Lou376

Cadet
Joined
Feb 8, 2020
Messages
1
I know this is an old thread but when researching this I found many similar questions but not many solutions.

I was running in to this same issue. I made sure that both the sonarr and sabnzb service accounts had access to the downloads folder as well as the final destination on the nas but I was still getting permissions errors in Sonarr.

The issue was that when sabnzb downloads a new file, it defaults the permissions to read only for the group. To fix it, I went to the Sabnzb config from the web interface and went to the folders section. You have to check the box to show advanced settings. Then I changed the "Permissions for completed downloads" to 775.

This fixed the issue for me. Hope this helps.
 
Top