V4 Beta Permission Issues

Sonarr version (exact version): v4.0.0.202 running on Docker
Package Version: v4-5d30afc by hotio
.Net Version: 6.0.8
OS: Debian Bullseye on RPi4
Debug logs: https://hastebin.com/otimokasuf.pl
Description of issue:
I’m sure this has been discussed 1000 times, but I’m not able to find a solution in the forums or in other searches. I’m running Sonarr via Docker. v3 was working without issue and I upgraded to v4 Beta. Since then, files are not copying/moving from their download location to the library. It is giving permissions issues. The download folder and library are cifs shares on my intranet and everything in the cifs shares are set with 777 permissions (I’m aware of the risks). Any advice on how to further troubleshoot or fix?

Error:

[v4.0.0.202] System.UnauthorizedAccessException: Access to the path is denied.
 ---> System.IO.IOException: Permission denied
   --- End of inner exception stack trace ---
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
   at System.IO.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite)
   at NzbDrone.Mono.Disk.DiskProvider.TransferFilePatched(String source, String destination, Boolean overwrite, Boolean move) in M:\BuildAgent\work\13f3e374fa512e16\src\NzbDrone.Mono\Disk\DiskProvider.cs:line 328
   at NzbDrone.Common.Disk.DiskProviderBase.CopyFile(String source, String destination, Boolean overwrite) in M:\BuildAgent\work\13f3e374fa512e16\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 229
   at NzbDrone.Common.Disk.DiskTransferService.TryCopyFileVerified(String sourcePath, String targetPath, Int64 originalSize) in M:\BuildAgent\work\13f3e374fa512e16\src\NzbDrone.Common\Disk\DiskTransferService.cs:line 487
   at NzbDrone.Common.Disk.DiskTransferService.TransferFile(String sourcePath, String targetPath, TransferMode mode, Boolean overwrite) in M:\BuildAgent\work\13f3e374fa512e16\src\NzbDrone.Common\Disk\DiskTransferService.cs:line 296
   at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile(EpisodeFile episodeFile, Series series, List`1 episodes, String destinationFilePath, TransferMode mode) in M:\BuildAgent\work\13f3e374fa512e16\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:line 140
   at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile(EpisodeFile episodeFile, LocalEpisode localEpisode, Boolean copyOnly) in M:\BuildAgent\work\13f3e374fa512e16\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:line 73
   at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import(List`1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem, ImportMode importMode) in M:\BuildAgent\work\13f3e374fa512e16\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:line 108

Docker Compose:

[...]
  sonarr:
    depends_on:
      - openvpn-client
    network_mode: service:openvpn-client
    container_name: sonarr
    image: cr.hotio.dev/hotio/sonarr:v4
    restart: unless-stopped
    logging:
      driver: json-file
    environment:
      - PUID=1002
      - PGID=1001
      - UMASK=002
      - TZ=America/New_York
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /docker/appdata/sonarr:/config
      - /mnt/theshed:/data
[...]

ls Permissions:

Fstab:

@Locutus your personal opinion on Docker is not relevant here, if you don’t have something constructive to add to the conversation please refrain from responding.

@Snuffy2 the short answer is it’s going to be permissions, something doesn’t add up, but the longer answer is, post the full logs somewhere and link them here as well as the ls -alh of the file that is failing to import.

Thanks. I’m hoping you can help me sort out where the permissions issue is. I had posted a log in the original post and a link to one from right now is: https://hastebin.com/rutesesoze.pl

ls -alh from the RPi Bash:
Source Files:

pi@torrentbox:/mnt/theshed/torrents/House of the Dragon (2022) Season 1 S01 (1080p HMAX WEB-DL x265 HEVC 10bit DDP 5.1 Vyndros) $ ls -alh
total 15G
drwxrwxrwx 2 pi media    0 Dec  1 21:42 .
drwxrwxrwx 2 pi media    0 Dec  1 21:42 ..
-rwxrwxrwx 1 pi media 1.8G Dec  1 22:19 House.of.the.Dragon.S01E01.The.Heirs.of.the.Dragon.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv
-rwxrwxrwx 1 pi media 1.4G Dec  1 22:19 House.of.the.Dragon.S01E02.The.Rogue.Prince.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv
-rwxrwxrwx 1 pi media 2.0G Dec  1 22:19 House.of.the.Dragon.S01E03.Second.of.His.Name.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv
-rwxrwxrwx 1 pi media 1.6G Dec  1 22:18 House.of.the.Dragon.S01E04.King.of.the.Narrow.Sea.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv
-rwxrwxrwx 1 pi media 1.6G Dec  1 22:12 House.of.the.Dragon.S01E05.We.Light.the.Way.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv
-rwxrwxrwx 1 pi media 1.6G Dec  1 22:12 House.of.the.Dragon.S01E06.The.Princess.and.the.Queen.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv
-rwxrwxrwx 1 pi media 1.3G Dec  1 22:13 House.of.the.Dragon.S01E07.Driftmark.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv
-rwxrwxrwx 1 pi media 1.5G Dec  1 22:18 House.of.the.Dragon.S01E08.The.Lord.of.the.Tides.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv
-rwxrwxrwx 1 pi media 1.3G Dec  1 22:16 House.of.the.Dragon.S01E09.The.Green.Council.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv
-rwxrwxrwx 1 pi media 1.4G Dec  1 22:18 House.of.the.Dragon.S01E10.The.Black.Queen.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv

Destination Folder:

pi@torrentbox:/mnt/theshed/Videos/TV/House of the Dragon (2022) [imdb-tt11198330] $ ls -alh
total 16K
drwxrwxrwx 2 pi media    0 Dec  1 22:21  .
drwxrwxrwx 2 pi media    0 Nov 30 18:24  ..
-rwxrwxrwx 1 pi media 8.1K Nov 30 18:27  .DS_Store
drwxrwxrwx 2 pi media    0 Dec  1 23:28 'Season 01'

ls -alh from sh in Sonarr Docker:
Source Files:

/data/torrents/House of the Dragon (2022) Season 1 S01 (1080p HMAX WEB-DL x265 HEVC 10bit DDP 5.1 Vyndros) # ls -alh
total 15G
drwxrwxrwx 2 1000 hotio    0 Dec  1 21:42 .
drwxrwxrwx 2 1000 hotio    0 Dec  1 21:42 ..
-rwxrwxrwx 1 1000 hotio 1.8G Dec  1 22:19 House.of.the.Dragon.S01E01.The.Heirs.of.the.Dragon.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv
-rwxrwxrwx 1 1000 hotio 1.4G Dec  1 22:19 House.of.the.Dragon.S01E02.The.Rogue.Prince.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv
-rwxrwxrwx 1 1000 hotio 2.0G Dec  1 22:19 House.of.the.Dragon.S01E03.Second.of.His.Name.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv
-rwxrwxrwx 1 1000 hotio 1.6G Dec  1 22:18 House.of.the.Dragon.S01E04.King.of.the.Narrow.Sea.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv
-rwxrwxrwx 1 1000 hotio 1.6G Dec  1 22:12 House.of.the.Dragon.S01E05.We.Light.the.Way.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv
-rwxrwxrwx 1 1000 hotio 1.6G Dec  1 22:12 House.of.the.Dragon.S01E06.The.Princess.and.the.Queen.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv
-rwxrwxrwx 1 1000 hotio 1.3G Dec  1 22:13 House.of.the.Dragon.S01E07.Driftmark.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv
-rwxrwxrwx 1 1000 hotio 1.5G Dec  1 22:18 House.of.the.Dragon.S01E08.The.Lord.of.the.Tides.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv
-rwxrwxrwx 1 1000 hotio 1.3G Dec  1 22:16 House.of.the.Dragon.S01E09.The.Green.Council.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv
-rwxrwxrwx 1 1000 hotio 1.4G Dec  1 22:18 House.of.the.Dragon.S01E10.The.Black.Queen.1080p.10bit.HMAX.WEB-DL.DDP5.1.HEVC-Vyndros.mkv

Destination Folder:

/data/Videos/TV/House of the Dragon (2022) [imdb-tt11198330] # ls -alh
total 16K
drwxrwxrwx 2 1000 hotio    0 Dec  1 22:21  .
drwxrwxrwx 2 1000 hotio    0 Nov 30 18:24  ..
-rwxrwxrwx 1 1000 hotio 8.1K Nov 30 18:27  .DS_Store
drwxrwxrwx 2 1000 hotio    0 Dec  1 23:24 'Season 01'

Not sure why it’s copying instead of hardlinking here, be worth making sure that’s enabled since it looks like it’s on the same volume. Beyond that nothing stands out as problematic to me, but someone on Discord might have a better idea.

It’s copying because they are different volumes. I’ll ask on Discord. Thanks.

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