Sonarr can't move file to correct folder after download

Hello,

I have set up transmission-openvpn, sonarr, radarr & plex with linuxserver images (with the exception of transmission-openvpn). When transmission finishes downloading a torrent, sonarr should be able to move it to the map where Plex picks it up. However, sonarr currently doesn’t do this. Error message: "
Import failed, path does not exist or is not accessible by Sonar."

Here is my full docker-compose.yml file (censored out sensitive credentials):

version: '3'

services:
  plex:
    image: linuxserver/plex
    container_name: plex
    network_mode: host
    ports:
      - "32400:32400"
    environment:
      - TZ=Europe/Brussels
      - PGID=1000
      - PUID=1000
      - VERSION=docker
    volumes:
      - /opt/docker/volumes/media/Series:/tv
      - /opt/docker/volumes/media/Movies:/movies
      - /opt/docker/volumes/plex/config:/config
    restart: always
    devices:
      - /dev/dri:/dev/dri
  
  transmission:
    image: haugene/transmission-openvpn
    container_name: transmission
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun
    restart: always
    dns:
      - 84.200.69.80
      - 84.200.70.40
    ports:
      - "9091:9091"
    volumes:
      - /home/server/docker/media/transmission/default.ovpn:/etc/openvpn/custom/default.ovpn
      - /home/server/docker/media/transmission/auth.txt:/etc/openvpn/custom/auth.txt
      - /opt/docker/volumes/media/torrents:/data
    environment:
      - OPENVPN_PROVIDER=CUSTOM
      - OPENVPN_USERNAME=<censor>
      - OPENVPN_PASSWORD=<censor>
      - TRANSMISSION_RATIO_LIMIT_ENABLED=true
      - TRANSMISSION_RPC_AUTHENTICATION_REQUIRED=true
      - TRANSMISSION_RPC_ENABLED=true
      - TRANSMISSION_RPC_USERNAME=<censor>
      - TRANSMISSION_RPC_PASSWORD=<censor>
      - TRANSMISSION_RATIO_LIMIT=0
      - PGID=1000
      - PUID=1000

  transmission-proxy:
    image: haugene/transmission-openvpn-proxy
    container_name: transmission-openvpn-proxy
    links:
      - transmission
    ports:
      - 8980:8080

  sonarr:
    image: linuxserver/sonarr
    container_name: sonarr
    restart: always
    ports:
      - "8989:8989"
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Brussels
    volumes:
      - /opt/docker/volumes/sonarr/config:/config
      - /opt/docker/volumes/media/Series:/tv
      - /opt/docker/volumes/media/torrents/completed:/downloads

  jackett:
    image: linuxserver/jackett
    container_name: jackett
    restart: always
    environment:
      - PGID=1000
      - PUID=1000
      - TZ=Europe/Brussels
    volumes:
      - /opt/docker/volumes/jackett/config:/config
      - /opt/docker/volumes/jackett/downloads:/downloads
    ports:
      - "9117:9117"

  radarr:
    image: linuxserver/radarr
    container_name: radarr
    restart: always
    ports:
      - "7878:7878"
    environment:
      - PGID=1000
      - PUID=1000
      - TZ=Europe/Brussels
    volumes:
      - /opt/docker/volumes/radarr/config:/config
      - /opt/docker/volumes/media/torrents/completed:/downloads
      - /opt/docker/volumes/media/Movies:/movies

I checked the rights of the files that are created by transmission, and they’re created by the user with id 1000 (so no root).

Can anyone help me?
Thanks!

You’re using a different volume mount for transmisson (/data) compared to what you’re using within Sonarr (/downloads).

These need to match across containers that are communicating with each other.

What do you mean exactly? What should I change? The sonarr volume mount is preconfigured by linuxserver, I can’t change /downloads path.

Add this line to your radarr/sonarr configs and it should fix it.

Thanks for the answer. I think it did something, but it doesn’t work quite yet. I’m getting a different error now:

–Removed File Names–

at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x0005e] in <254335e8c4aa42e3923a8ba0d5ce8650>:0
at System.IO.Directory.CreateDirectory (System.String path) [0x0008f] in <254335e8c4aa42e3923a8ba0d5ce8650>:0
at NzbDrone.Common.Disk.DiskProviderBase.CreateFolder (System.String path) [0x00048] in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Disk\DiskProviderBase.cs:180
at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.CreateFolder (System.String directoryName) [0x0007a] in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:206
at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.EnsureEpisodeFolder (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Tv.Series series, System.Int32 seasonNumber, System.String filePath) [0x0006f] in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:169
at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.EnsureEpisodeFolder (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode, System.String filePath) [0x00000] in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:149
at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.MoveEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode) [0x0003e] in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:77
at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode, System.Boolean copyOnly) [0x0017c] in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:76
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) [0x00281] in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:108

Which seems identical to the previous one, but it’s still something else.

Please make sure you keep your logs clean when posting for support.
This is a host error, it will be do to with your permissions.

I debugged it in the container and it seems by 1000 user (abc) can’t create or move files to the /tv directory. Is this something related to the host? I removed my /opt/docker/volumes/media directory and restarted all my Docker containers.

It means user 1000 on your host system doesn’t seem to have access to /tv

Hmm, you’re correct. The folder is root:root, even though I explicitly say to use 1000:1000, very weird.

I created the folders myself instead of Docker creating them and it works now. Thanks alot for your help!