14
submitted 1 year ago* (last edited 1 year ago) by Tiritibambix@lemmy.ml to c/selfhosted@lemmy.world

Solution: Use NFS -_-'


Hello. I've been using hotio's qbittorent, radarr and sonarr images for a while and I've been really happy with it. But A few weeks ago, I started having problems with radarr failing to copy my files to the destination folder. I have qbittorrent on machine A and my video server on machine B (called "orbiter"). I mounted destination folder on machine B to machine A like follow: sudo mount -t cifs //orbiter/Video/ /mnt/OrbiterVideo -o username=root,password=omgstrongpassword,uid=998,gid=100

And added it to fstab: //orbiter/Video /mnt/OrbiterVideo/ cifs username=root,password=omgstrongpassword,iocharset=utf8,noperm,uid=998,gid=100 0 0

Now, here are my docker-compose for qbittorrent and radarr :

QBittorrentVPN

version: "3.7"

services:
  qbittorrent:
    container_name: qbittorrentvpn
    image: cr.hotio.dev/hotio/qbittorrent
    ports:
      - 8992:8992
      - 8118:8118
    environment:
      - WEBUI_PORTS=8992/tcp,8992/udp
      - PUID=998
      - PGID=100
      - UMASK=0022
      - TZ=Europe/Paris
      - VPN_ENABLED=true
      - VPN_LAN_NETWORK=192.168.1.0/24
      - VPN_CONF=wg0
     # - VPN_ADDITIONAL_PORTS
      - VPN_IP_CHECK_DELAY=5
      - PRIVOXY_ENABLED=false
      - DEBUG=yes
    volumes:
      - /srv/path/Files/QBittorrentVPN:/config
      - /srv/path/Files/QBittorrentVPN/downloads:/downloads
      - /srv/path/Files/QBittorrentVPN/skins:/skins
    cap_add:
      - NET_ADMIN
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
      - net.ipv6.conf.all.disable_ipv6=1
    restart: unless-stopped

Radarr

version: "3.7"

services:
  radarr:
    container_name: radarr
    hostname: Radarr
    image: cr.hotio.dev/hotio/radarr
    ports:
      - "7878:7878"
    environment:
      - PUID=998
      - PGID=100
      - UMASK=002
      - TZ=Europe/Paris
    volumes:
      - /srv/path/Files/Radarr/config:/config
      - /srv/path/Files/QBittorrentVPN/downloads:/downloads
      - /mnt/OrbiterVideo/movies/:/movies
    restart: unless-stopped

Radarr manages to grab and download a movie, but it fails to copy it:

2023-07-21 16:15:59.3|Warn|ImportApprovedMovie|Couldn't import movie /downloads/awesomemovie.mkv

[v4.6.4.7568] System.UnauthorizedAccessException: Access to the path '/movies/awesomemovie' is denied.
 ---> System.IO.IOException: Permission denied
  
***
End of inner exception stack trace
***
   at System.IO.FileSystem.CreateDirectory(String fullPath)
   at System.IO.Directory.CreateDirectory(String path)
   at NzbDrone.Common.Disk.DiskProviderBase.CreateFolder(String path) in ./Radarr.Common/Disk/DiskProviderBase.cs:line 189
   at NzbDrone.Core.MediaFiles.MovieFileMovingService.CreateFolder(String directoryName) in ./Radarr.Core/MediaFiles/MovieFileMovingService.cs:line 215
   at NzbDrone.Core.MediaFiles.MovieFileMovingService.EnsureMovieFolder(MovieFile movieFile, Movie movie, String filePath) in ./Radarr.Core/MediaFiles/MovieFileMovingService.cs:line 185
   at NzbDrone.Core.MediaFiles.MovieFileMovingService.EnsureMovieFolder(MovieFile movieFile, LocalMovie localMovie, String filePath) in ./Radarr.Core/MediaFiles/MovieFileMovingService.cs:line 165
   at NzbDrone.Core.MediaFiles.MovieFileMovingService.CopyMovieFile(MovieFile movieFile, LocalMovie localMovie) in ./Radarr.Core/MediaFiles/MovieFileMovingService.cs:line 90
   at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeMovieFile(MovieFile movieFile, LocalMovie localMovie, Boolean copyOnly) in ./Radarr.Core/MediaFiles/UpgradeMediaFileService.cs:line 73
   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

It is important to note that I didn't change anything in my config.

Is there something I am doing wrong here ? I can't see through this anymore.

top 16 comments
sorted by: hot top controversial new old
[-] MrCalvin@lemmy.world 2 points 1 year ago* (last edited 1 year ago)

What do the permissions look like on newly created files and directories from the qBittorrent container? Run ls -al and check to see, this sounds like a simple fix.

You can try adding file_mode and dir_mode to your fstab mount as well.

https://superuser.com/questions/1359092/whats-the-difference-between-file-mode-dir-mode-and-gid-when-mounting-a-cif

[-] Tiritibambix@lemmy.ml 4 points 1 year ago

Folders are drwxr-sr-x and files are rw-r--r--

I added file_mode and dir_mode in my fstab mount. But should I erase uid and gid as this post mentions that it overrides file_mode and dir_mode ?

[-] MrCalvin@lemmy.world 1 points 1 year ago

I know you marked this as SOLVED, however I just noticed (dunno how I missed it before) that your umask is 022 for qBittorrent but it is 002 for Radar. Even though you have the same UID/GID on both systems I’d still recommend setting 002 umask in the qBittorrent compose file

[-] Tiritibambix@lemmy.ml 3 points 1 year ago

Will do. Thanks :)

[-] Im_old@lemmy.world 2 points 1 year ago

I know it's linux and you never reboot it and yadda yadda, but have you tried rebooting both machines?

For what it's worth, that's my fstab entry (it's mounted with a normal user, which is the same which the containers use). I seem to remember I had to change ownership of the /mnt/nasdownload folder (before the mount) to the user used to mount it.

//192.168.1.10/Download /mnt/nasdownload cifs auto,user,uid=1000,gid=1000,rw,iocharset=utf8,suid,credentials=/root/.smbgringo,file_mode=0770,dir_mode=0770,_netdev,vers=3.0 0 0

[-] Tiritibambix@lemmy.ml 4 points 1 year ago

I tried rebooting with no luck. Changing my fstag entry following your suggestion didn't work either.

[-] cc8@infosec.pub 2 points 1 year ago* (last edited 1 year ago)

Does the ending / intervene maybe?

  - /mnt/OrbiterVideo/movies/:/movies

Is the share mounted?

Can you browse the mount from source machine?

Can you browse the share inside the docker container? (--interactive)

[-] Tiritibambix@lemmy.ml 5 points 1 year ago

The ending / wasn't a problem a few weeks back, but I tried to remove it anyway with no luck. The share is mounted and I can browse it from source machine and container.

[-] cc8@infosec.pub 2 points 1 year ago* (last edited 1 year ago)

Have you set the correct chown permissions? ls -al /mnt/OrbiterVideo/movies

I have a similiar issue on a plex transcode folder that randomly resets permissions.

[-] Tiritibambix@lemmy.ml 4 points 1 year ago* (last edited 1 year ago)

Sorry if the question is silly, I'm really not good at this: Permissions are drwxr-xr-x (755).

Shouldn't they be drw-rw-rw- (666) or 777 ?

Other than that, the user:group looks good.

I can't seem to manage to change permissions anyway

[-] cc8@infosec.pub 2 points 1 year ago

Can you create files and directories in /movies inside the docker container?

[-] Tiritibambix@lemmy.ml 4 points 1 year ago* (last edited 1 year ago)

No. Permission denied.

Edit: But I can in /config, which is bound to a volume on the host, not the smb

[-] cc8@infosec.pub 2 points 1 year ago

Ok, that means that the issue is slimmed down to the permissions on the mounted smb share. Not docker or radarr which makes it easier to troubleshoot.

I am not a cifs share black belt though but continue from there :)

[-] Tiritibambix@lemmy.ml 4 points 1 year ago

Thanks for trying to help :)

[-] SheeEttin@lemmy.world -1 points 1 year ago* (last edited 1 year ago)

So what do the permissions look like on that file? Does it work if you enter the container as that user and try it yourself? If you have selinux enforcing, have you checked its audit log?

[-] Tiritibambix@lemmy.ml 3 points 1 year ago

It has same user:group as files that could be copied before I started having bugs, And that's the user: group I need. I have this problem with multiple files, downloaded at different times, trying to copy them on different locations on my mount. So my guess as a beginner is that the problem is at the destination. I don't have selinux.

load more comments
view more: next ›
this post was submitted on 21 Jul 2023
14 points (88.9% liked)

Selfhosted

40697 readers
99 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS