Access to path is denied - tried everything

Sonarr version (exact version): 2.0.0.5344
OS: Synology DSM 6.2.3
Description of issue:

Ok, I am hoping someone can help me here. I have tried absolutely everything and unfortunately I am getting no where.

I use a Synology NAS for Sonarr, Radarr and Sabnzbd and previously used the community packages. Yesterday, I decided to move everything across to Docker. Whilst the general setup has worked, the importing etc… does not and everything I have done has not helped.

I have created a separate User Group called Docker, I have created individual users for each app (Sonarr, Radarr and Sabnzbd), I have mapped all the folders and given them all the permissions they need.

When I request a new episode in Sonarr, it sends the request to Sabnzbd which proceeds to download it. Once downloaded Sabnzbd extracts it but then I get the following error within Sonarr and the episode just sits within the /downloads/complete folder.


20-7-9 19:20:07.1|Debug|Parser|Quality parsed: WEBDL-1080p v1
20-7-9 19:20:07.2|Debug|Parser|Release Group parsed: METCON
20-7-9 19:20:07.2|Debug|MediaInfoFormatter|Formatting audio channels using ‘AudioChannelPositions’, with a value of: ‘3/2/0.1’
20-7-9 19:20:07.2|Debug|EpisodeFileMovingService|Moving episode file: /downloads/complete/NAMEOFSHOW.mkv to /WD 8TB/TV Shows/NAMEOFSHOW/Season 07/NAMEOFSHOW.mkv
20-7-9 19:20:07.2|Debug|DiskTransferService|Move [/downloads/complete/NAMEOFSHOW.mkv] > [/WD 8TB/TV Shows/NAMEOFSHOW/Season 07/NAMEOFSHOW.mkv]
20-7-9 19:20:07.3|Debug|DiskProvider|Hardlink ‘/downloads/complete/NAMEOFSHOW’ to ‘/downloads/complete/NAMEOFSHOW.mkv.backup~’ failed.

[v2.0.0.5344] System.UnauthorizedAccessException: Permission denied —> Mono.Unix.UnixIOException: Permission denied [EACCES].
— End of inner exception stack trace —
at Mono.Unix.UnixMarshal.ThrowExceptionForLastError () [0x00005] in <4a040cc44eb54354b3d289eb2bbc1e23>:0
at Mono.Unix.UnixMarshal.ThrowExceptionForLastErrorIf (System.Int32 retval) [0x00004] in <4a040cc44eb54354b3d289eb2bbc1e23>:0
at Mono.Unix.UnixFileSystemInfo.CreateLink (System.String path) [0x0000c] in <4a040cc44eb54354b3d289eb2bbc1e23>:0
at NzbDrone.Mono.Disk.DiskProvider.TryCreateHardLink (System.String source, System.String destination) [0x00013] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Mono\Disk\DiskProvider.cs:182

20-7-9 19:20:07.3|Debug|DiskTransferService|Rolling back incomplete file move [/downloads/complete/NAMEOFSHOW.mkv] to [/WD 8TB/TV Shows/NAMEOFSHOW/Season 07/NAMEOFSHOW.mkv].
20-7-9 19:20:08.0|Debug|Api|[GET] /api/log/file/sonarr.debug.txt: 200.OK (3 ms)
20-7-9 19:20:10.3|Warn|ImportApprovedEpisodes|Couldn’t import episode /downloads/complete/NAMEOFSHOW.mkv

[v2.0.0.5344] System.UnauthorizedAccessException: Access to the path is denied.

Couldn't import episode /downloads/complete/SHOW NAME.mkv: 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) [0x00116] in <254335e8c4aa42e3923a8ba0d5ce8650>:0 at NzbDrone.Common.Disk.DiskProviderBase.MoveFileInternal (System.String source, System.String destination) [0x00000] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Disk\DiskProviderBase.cs:232 at NzbDrone.Mono.Disk.DiskProvider.MoveFileInternal (System.String source, System.String destination) [0x00076] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Mono\Disk\DiskProvider.cs:170 at NzbDrone.Common.Disk.DiskProviderBase.MoveFile (System.String source, System.String destination, System.Boolean overwrite) [0x000e3] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Disk\DiskProviderBase.cs:227 at NzbDrone.Common.Disk.DiskTransferService.TryMoveFileTransactional (System.String sourcePath, System.String targetPath, System.Int64 originalSize, NzbDrone.Common.Disk.DiskTransferVerificationMode verificationMode) [0x0008f] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Disk\DiskTransferService.cs:490 at NzbDrone.Common.Disk.DiskTransferService.TransferFile (System.String sourcePath, System.String targetPath, NzbDrone.Common.Disk.TransferMode mode, System.Boolean overwrite, NzbDrone.Common.Disk.DiskTransferVerificationMode verificationMode) [0x003ce] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Disk\DiskTransferService.cs:312 at NzbDrone.Common.Disk.DiskTransferService.TransferFile (System.String sourcePath, System.String targetPath, NzbDrone.Common.Disk.TransferMode mode, System.Boolean overwrite, System.Boolean verified) [0x0000e] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Disk\DiskTransferService.cs:196 at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Tv.Series series, System.Collections.Generic.List\ 1[T] episodes, System.String destinationFilePath, NzbDrone.Common.Disk.TransferMode mode) [0x0012c] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:119 at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.MoveEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode) [0x0005e] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:81 at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode, System.Boolean copyOnly) [0x0017c] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:76 at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import (System.Collections.Generic.List1[T] decisions, System.Boolean newDownload, NzbDrone.Core.Download.DownloadClientItem downloadClientItem, NzbDrone.Core.MediaFiles.EpisodeImport.ImportMode importMode) [0x00281] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:108

I have setup Remote Mappings under “Download Client” but they made no difference, which I later found out why as everything has the same mapping anyway.

Volume Mappings in Docker are as follows:
downloads = /downloads
USB Silver Drive = /USB Silver Drive
USB WD Drive = /USB WD Drive
WD 8TB = /WD 8TB
docker/sonarr = /config

My shows sit across three drives connected to the NAS via USB. These drives are all accessible via Sonarr as I have been able to load the shows into the library, so it is able to read them.

  • I have given the “Sonarr” user and the Group it belongs to “docker” R/W access to all relevant folders.
  • I can see all folders and their free space within Sonarr - so it can see them
  • I have added all shows within Sonarr so it is able to read them
  • I have applied permissions in Synology Multiple times to be sure.

The only thing which I have noticed is that for the Internal synology volume you are able to right click the shared folder, hit properties and then Permissions and here you can go one step further than R/W and give Full Control (including Admin rights). This option does not appear when working with USB drives (screenshots below). But surely this can’t be the problem?

So long story short, I have no idea why it is saying access denied… any ideas?

Internal Drive Permissions


USB Permissions

I SSH’d into the NAS as the Sonarr User and saw these permissions set, from my understanding this is correct?
(The blacked out words are just my name)
So it looks like the folder is owned by me and the users group - not Sonarr and the docker group - but that shouldn’t matter?

Screen Shot 2020-07-09 at 8.00.06 PM

I have now also gone ahead and changed the PGID and PUID of the Docker Sonarr Container to the Admin User on the NAS - this belongs to the Admin group and has full access.

Also changed the Owner of the TV Shows folders to Sonarr and Docker group - no change.

I am still getting the same errors - so I think this is a core issue with the Sonarr package.

Edit: SonarrV3 doesn’t work either.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.