Radarr missing write permissions, acces denied

Good day

I have setup Radarr together with sab, sonarr and emby.
All the containers are run from the same compose file with the same permissions, but radarr is the only one unable to move the downloaded file, from the download folder to the storage location.
The download folder is on a local drive and the storage location is on a truenas nfs mount set up as a storage volume in each container.
Radarr is able to read both the final storage location, I was able to import my library, and it is able to find the file that has been downloaded and parse it but, access is denied when moving the file.

this is my compose file:


---
version: "2.1"
networks:

  default:
    driver: bridge
  kdev_network:
    external: false


volumes:

  storage:
    driver: local
    driver_opts:
      type: nfs
      o: "addr=192.168.100.220,nolock,soft,rw"
      device: ":/mnt/tank/media/emby"

services:
 emby:
   image: ghcr.io/linuxserver/emby
   container_name: emby
   environment:
     - PUID=568
     - PGID=568
     - TZ=Europe/Copenhagen
     - UMASK_SET=022 #optional
   devices:
     - /dev/dri:/dev/dri
   volumes:
     - /opt/appdata/emby:/config
     - storage:/storage
     - /mnt/scratch:/scratch
   networks:
     - kdev_network
   ports:
     - 8096:8096
     - 8920:8920
   restart: unless-stopped

 sabnzbd:
   image: lscr.io/linuxserver/sabnzbd:latest
   container_name: sabnzbd
   volumes:
     - /opt/appdata/sabnzbd:/config
     - /mnt/scratch:/scratch
   ports:
     - 8787:8080
     - 9191:9191
   networks:
     - kdev_network
   environment:
     - PUID=568
     - PGID=568
     - TZ=${TZ}
   restart:
     always

 sonarr:
   image: lscr.io/linuxserver/sonarr:latest
   container_name: sonarr
   volumes:
     - /opt/appdata/sonarr:/config
     - /mnt/scratch:/scratch
     - storage:/storage
   networks:
     - kdev_network
   ports:
     - 8989:8989
   restart:
     always
   environment:
     - PUID=568
     - PGID=568
     - TZ=${TZ}

 radarr:
   image: lscr.io/linuxserver/radarr:latest
   container_name: radarr
   volumes:
     - /opt/appdata/radarr:/config
     - storage:/storage
     - /mnt/scratch:/scratch
   networks:
     - kdev_network
   ports:
     - 7878:7878
   environment:
     - PUID=568
     - PGID=568
     - TZ=${TZ}
   restart:
     always

this is the radarr debig log file:

[Fatal] ConsoleApp: Failed to bind to address http://[::]:7878: address already in use. This can happen if another instance of Radarr is already running another application is using the same port (default: 7878) or the user has insufficient permissions 
Press enter to exit...
[Info] Microsoft.Hosting.Lifetime: Application is shutting down... 
[Info] ConsoleApp: Exiting main. 
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────
      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 
   Brought to you by linuxserver.io
───────────────────────────────────────
To support the app dev(s) visit:
Radarr: https://opencollective.com/radarr
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID:    568
User GID:    568
───────────────────────────────────────
[custom-init] No custom files found, skipping...
[Info] Bootstrap: Starting Radarr - /app/radarr/bin/Radarr - Version 5.0.3.8127 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Debug] Bootstrap: Console selected 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Info] MigrationController: *** Migrating data source=/config/radarr.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 *** 
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-20000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 *** 
[Info] Microsoft.Hosting.Lifetime: Now listening on: http://[::]:7878 
[Info] CommandExecutor: Starting 2 threads for tasks. 
[Info] Microsoft.Hosting.Lifetime: Application started. Press Ctrl+C to shut down. 
[Info] Microsoft.Hosting.Lifetime: Hosting environment: Production 
[Info] Microsoft.Hosting.Lifetime: Content root path: /app/radarr/bin 
[ls.io-init] done.
[Warn] ImportApprovedMovie: Couldn't import movie /scratch/complete/movies/Big.Buck.Bunny.2008.1080p.x264-60fps.Surround/Big.Buck.Bunny.2008.1080p.x264-60fps.Surround.avi 
[v5.0.3.8127] System.UnauthorizedAccessException: Access to the path '/storage/Movies/Big Buck Bunny (2008)/Big Buck Bunny (2008) {MediaInfo SimpleAC3.avi' is denied.
 ---> System.IO.IOException: Operation not permitted
   --- End of inner exception stack trace ---
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Interop.CheckIo(Error error, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite)
   at System.IO.FileSystem.LinkOrCopyFile(String sourceFullPath, String destFullPath)
   at System.IO.FileSystem.MoveFile(String sourceFullPath, String destFullPath, Boolean overwrite)
   at System.IO.File.Move(String sourceFileName, String destFileName, Boolean overwrite)
   at System.IO.File.Move(String sourceFileName, String destFileName)
   at NzbDrone.Common.Disk.DiskProviderBase.MoveFileInternal(String source, String destination) in ./Radarr.Common/Disk/DiskProviderBase.cs:line 277
   at NzbDrone.Mono.Disk.DiskProvider.TransferFilePatched(String source, String destination, Boolean overwrite, Boolean move) in ./Radarr.Mono/Disk/DiskProvider.cs:line 352
   at NzbDrone.Mono.Disk.DiskProvider.MoveFileInternal(String source, String destination) in ./Radarr.Mono/Disk/DiskProvider.cs:line 325
   at NzbDrone.Common.Disk.DiskProviderBase.MoveFile(String source, String destination, Boolean overwrite) in ./Radarr.Common/Disk/DiskProviderBase.cs:line 259
   at NzbDrone.Common.Disk.DiskTransferService.TryMoveFileVerified(String sourcePath, String targetPath, Int64 originalSize) in ./Radarr.Common/Disk/DiskTransferService.cs:line 495
   at NzbDrone.Common.Disk.DiskTransferService.TransferFile(String sourcePath, String targetPath, TransferMode mode, Boolean overwrite) in ./Radarr.Common/Disk/DiskTransferService.cs:line 386
   at NzbDrone.Core.MediaFiles.MovieFileMovingService.TransferFile(MovieFile movieFile, Movie movie, String destinationFilePath, TransferMode mode, LocalMovie localMovie) in ./Radarr.Core/MediaFiles/MovieFileMovingService.cs:line 138
   at NzbDrone.Core.MediaFiles.MovieFileMovingService.MoveMovieFile(MovieFile movieFile, LocalMovie localMovie) in ./Radarr.Core/MediaFiles/MovieFileMovingService.cs:line 82
   at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeMovieFile(MovieFile movieFile, LocalMovie localMovie, Boolean copyOnly) in ./Radarr.Core/MediaFiles/UpgradeMediaFileService.cs:line 77
   at NzbDrone.Core.MediaFiles.MovieImport.ImportApprovedMovie.Import(List`1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem, ImportMode importMode) in ./Radarr.Core/MediaFiles/MovieImport/ImportApprovedMovie.cs:line 129
[Warn] ImportApprovedMovie: Couldn't import movie /scratch/complete/movies/Big.Buck.Bunny.2008.1080p.x264-60fps.Surround/Big.Buck.Bunny.2008.1080p.x264-60fps.Surround.avi 
[v5.0.3.8127] System.UnauthorizedAccessException: Access to the path '/storage/Movies/Big Buck Bunny (2008)/Big Buck Bunny (2008) {MediaInfo SimpleAC3.avi' is denied.
 ---> System.IO.IOException: Operation not permitted
   --- End of inner exception stack trace ---
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Interop.CheckIo(Error error, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite)
   at System.IO.FileSystem.LinkOrCopyFile(String sourceFullPath, String destFullPath)
   at System.IO.FileSystem.MoveFile(String sourceFullPath, String destFullPath, Boolean overwrite)
   at System.IO.File.Move(String sourceFileName, String destFileName, Boolean overwrite)
   at System.IO.File.Move(String sourceFileName, String destFileName)
   at NzbDrone.Common.Disk.DiskProviderBase.MoveFileInternal(String source, String destination) in ./Radarr.Common/Disk/DiskProviderBase.cs:line 277
   at NzbDrone.Mono.Disk.DiskProvider.TransferFilePatched(String source, String destination, Boolean overwrite, Boolean move) in ./Radarr.Mono/Disk/DiskProvider.cs:line 352
   at NzbDrone.Mono.Disk.DiskProvider.MoveFileInternal(String source, String destination) in ./Radarr.Mono/Disk/DiskProvider.cs:line 325
   at NzbDrone.Common.Disk.DiskProviderBase.MoveFile(String source, String destination, Boolean overwrite) in ./Radarr.Common/Disk/DiskProviderBase.cs:line 259
   at NzbDrone.Common.Disk.DiskTransferService.TryMoveFileVerified(String sourcePath, String targetPath, Int64 originalSize) in ./Radarr.Common/Disk/DiskTransferService.cs:line 495
   at NzbDrone.Common.Disk.DiskTransferService.TransferFile(String sourcePath, String targetPath, TransferMode mode, Boolean overwrite) in ./Radarr.Common/Disk/DiskTransferService.cs:line 386
   at NzbDrone.Core.MediaFiles.MovieFileMovingService.TransferFile(MovieFile movieFile, Movie movie, String destinationFilePath, TransferMode mode, LocalMovie localMovie) in ./Radarr.Core/MediaFiles/MovieFileMovingService.cs:line 138
   at NzbDrone.Core.MediaFiles.MovieFileMovingService.MoveMovieFile(MovieFile movieFile, LocalMovie localMovie) in ./Radarr.Core/MediaFiles/MovieFileMovingService.cs:line 82
   at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeMovieFile(MovieFile movieFile, LocalMovie localMovie, Boolean copyOnly) in ./Radarr.Core/MediaFiles/UpgradeMediaFileService.cs:line 77
   at NzbDrone.Core.MediaFiles.MovieImport.ImportApprovedMovie.Import(List`1 decisions, Boolean newDownload, DownloadClientItem downloadClientItem, ImportMode importMode) in ./Radarr.Core/MediaFiles/MovieImport/ImportApprovedMovie.cs:line 129
[Warn] DownloadedMovieImportService: Non-sample file detected: [/scratch/complete/movies/Big.Buck.Bunny.2008.1080p.x264-60fps.Surround/Big.Buck.Bunny.2008.1080p.x264-60fps.Surround.avi]

Hope someone can help me.

We do not offer support for remote mounts. What I will tell you, is that you need to ensure your NFS is properly configured to use the same UIDs across systems.

I would also suggest testing with local storage to rule out any shenanigans on the host or within the container.

Hi driz

The remote mount is owned by the user “apps” with the uid/guid 568 and the scratch drive which is completely local, is set up with the same user and uid. This is the same uid used by the other containers which doesn’t have the same problem, this is what confuses me the most.