Another Import issue: Access to the path

Sonarr version (exact version): 3.0.8.1507
Mono version (if Sonarr is not running on Windows): 6.12.0.122
OS: Raspberry Pi, Docker
Debug logs:
Description of issue: System.UnauthorizedAccessException: Access to the path

I’m unable to auto import files, I have the same settings for example with Radarr and have no issue. I see also specific series folder is being created of the series relevant to the file, but somehow Sonarr can’t transfer the file to the folder.
I already tried everything the last 2 days but i dont see what is wrong i played with all the rights and all systems have PUID:1000 and PGIUD:1000, but still not able to transfer.
Weird thing is if I say manually import than there is no problem?

Couldn't import episode /downloads/complete/The.Last.of.Us.S01E01.WEB.x264-TORRENTGALAXY[TGx]/The.Last.of.Us.S01E01.WEB.x264-TORRENTGALAXY.mkv: Access to the path "/tv/HDD 02/Series/The Last of Us/The.Last.of.Us.S01E01.WEB.x264-TORRENTGALAXY[TGx].mkv" is denied.

Error

System.UnauthorizedAccessException: Access to the path "/tv/HDD 02/Series/The Last of Us/The.Last.of.Us.S01E01.WEB.x264-TORRENTGALAXY[TGx].mkv" is denied.
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <533173d24dae460899d2b10975534bb0>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in <533173d24dae460899d2b10975534bb0>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in <533173d24dae460899d2b10975534bb0>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
  at NzbDrone.Mono.Disk.DiskProvider.TransferFilePatched (System.String source, System.String destination, System.Boolean overwrite, System.Boolean move) [0x0011a] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Mono\Disk\DiskProvider.cs:363 
  at NzbDrone.Mono.Disk.DiskProvider.CopyFileInternal (System.String source, System.String destination, System.Boolean overwrite) [0x0009c] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Mono\Disk\DiskProvider.cs:257 
  at NzbDrone.Common.Disk.DiskProviderBase.CopyFile (System.String source, System.String destination, System.Boolean overwrite) [0x000ba] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Disk\DiskProviderBase.cs:231 
  at NzbDrone.Common.Disk.DiskTransferService.TryCopyFileVerified (System.String sourcePath, System.String targetPath, System.Int64 originalSize) [0x00047] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Disk\DiskTransferService.cs:468 
  at NzbDrone.Common.Disk.DiskTransferService.TransferFile (System.String sourcePath, System.String targetPath, NzbDrone.Common.Disk.TransferMode mode, System.Boolean overwrite) [0x003ad] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Disk\DiskTransferService.cs:336 
  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) [0x00129] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:116 
  at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.CopyEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode) [0x00053] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:91 
  at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode, System.Boolean copyOnly) [0x0019b] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:73 
  at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import (System.Collections.Generic.List`1[T] decisions, System.Boolean newDownload, NzbDrone.Core.Download.DownloadClientItem downloadClientItem, NzbDrone.Core.MediaFiles.EpisodeImport.ImportMode importMode) [0x0029b] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:109 

Sonarr Settings:

HOME	/root
LANG	en_US.UTF-8
LANGUAGE	en_US.UTF-8
PATH	/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PGID	1000
PUID	1000
SONARR_BRANCH	main
TERM	xterm
TZ	Europe/Amsterdam
UMASK	000
XDG_CONFIG_HOME	/config/xdg

**Volumes:**
/var/media:	/tv
/var/media/HDD 02/incoming:	/downloads
/storage/.kodi/userdata/docker.sonarr/config:	/config

Transmission Setting:

HOME	/root
PATH	/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PGID	1000
PS1	$(whoami)@$(hostname):$(pwd)\$
PUID	1000
S6_CMD_WAIT_FOR_SERVICES_MAXTIME	0
S6_STAGE2_HOOK	/docker-mods
S6_VERBOSITY	1
TERM	xterm
TZ	Europe/Amsterdam
UMASK	000

**Volumes:**
/var/media/HDD 02/incoming:	/watch
/storage/.kodi/userdata/docker.transmission/config:	/config
/var/media/HDD 02/incoming:	/downloads

Remote Path Mappings
Host: 192.168.1.20
Remote Path: /var/media/HDD 02/incoming/
Local Path: /tv/HDD 02/incoming/

Please help im going mad!! :blush:

Didn’t take a close look at your setup, but you might want to change your umask. I think 002 is the recommended?

Take a look here https://wiki.servarr.com/docker-guide and here https://trash-guides.info/Hardlinks/How-to-setup-for/Docker/ for guidelines on how you want everything set up.

Might just need a one time recursive permissions fix per https://trash-guides.info/Hardlinks/How-to-setup-for/Docker/#permissions adapted to your path config

Also tried that, Umask 002 and changed my mount volume to /data as following the trash guide.
But still no luck :smiling_face_with_tear:

Fixed it!

So because i’m running Libreelec as the OS on my raspberry and docker is apparently running PUID = 0 and PGID= 0, so i changed all settings to to 0 and just to be sure added UMASK = 002.

hopes this helps people in the future