Permissions Sonarr Docker

**Sonarr version **: 2.0.0.4855
Mono version:5.0.1.1
OS: Linux
Description of issue: I have a new Synology DS1817+ with Sonarr running in a docker. When i download a file with deluge everything is oke but when i try to copy the file i get a permission error:

Couldn’t import episode /Complete/Suits.S07E03.1080p.WEB.x264-TBS/suits.s07e03.1080p.web.x264-tbs.mkv: Access to the path is denied.

Even when I make the folder accessible for everybody using chmod 777 i still get the error.

Does anyone have a idea what to do?

System.UnauthorizedAccessException: Access to the path is denied.
at System.IO.File.Move (System.String sourceFileName, System.String destFileName) [0x00116] in :0
at NzbDrone.Common.Disk.DiskProviderBase.MoveFile (System.String source, System.String destination, System.Boolean overwrite) [0x000e3] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Common\Disk\DiskProviderBase.cs:222
at NzbDrone.Common.Disk.DiskTransferService.TryMoveFileTransactional (System.String sourcePath, System.String targetPath, System.Int64 originalSize, NzbDrone.Common.Disk.DiskTransferVerificationMode verificationMode) [0x0008f] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Common\Disk\DiskTransferService.cs:489
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) [0x003c2] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Common\Disk\DiskTransferService.cs:311
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 M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Common\Disk\DiskTransferService.cs:195
at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Tv.Series series, System.Collections.Generic.List1[T] episodes, System.String destinationFilePath, NzbDrone.Common.Disk.TransferMode mode) [0x0012c] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:118 at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.MoveEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode) [0x0005e] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:80 at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode, System.Boolean copyOnly) [0x00144] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:66 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) [0x00277] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:107

While I haven’t set sonarr up with a NAS, I do have it running in a docker container. If you’re using the one on the Github page (linuxserver/sonarr), you need to specify the GID and UID in the docker container’s environment variables.

Before trying the following, it might also help to double check the file paths and ensure they are correct by navigating to them from docker’s interactive terminal (docker exec $container-id -it /bin/bash) and listing all the files.

You need to find the user and group id of the user running docker.
This can be done with id <dockeruser> and should return a string similar to this uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup).

You will need to take the values for UID and GID and specify them in the docker container with PUID=UID and PGID=GID.

Here’s an example of my docker-compose.yml for sonarr.
sonarr: image: linuxserver/sonarr:develop environment: PGID: '20' PUID: '501' stdin_open: true volumes: - ./sonarr:/config - ./media/downloads:/downloads - ./media/television:/television tty: true ports: - *****:***** labels: hostname: sonarr-server container_name: sonarr-server restart: always

For further reference, see this link.
https://hub.docker.com/r/linuxserver/sonarr/

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