Sonarr can't navigate mounted folders

Hey guys, I’m using rclone mount on my Raspberry Pi, and even though my user sees the mounted files and folders normally in the console, services running under the same user can’t, such as Sonarr and Radarr (the file browser provided by these tools won’t see anything in the mount point).

Here’s the info:

Rclone:

rclone v1.41

  • os/arch: linux/arm
  • go version: go1.10

Mount in Systemd:

[Unit]
Description=Rclone Mount
After=multi-user.target
[Service]
User=pi
Group=pi
Type=notify
TimeoutStartSec=10
ExecStart=/usr/bin/rclone mount gcrypt:Media /home/pi/gdrive --vfs-cache-mode writes --max-read-ahead 80M --transfers 5 --checkers 10 --config /home/pi/.config/rclone/rclone.conf --allow-other
ExecStop=fusermount -u /mnt/gdrive
Restart=on-abort
[Install]
WantedBy=multi-user.target

Sonarr Service:

[Unit]
Description=Sonarr Daemon
After=network.target
[Service]
User=pi
Group=pi
Type=simple
ExecStart=/usr/bin/mono /opt/NzbDrone/NzbDrone.exe -nobrowser
TimeoutStopSec=20
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target

Am I missing something? Thanks a lot!

Is Sonarr running as the PI user or in the PI group?

Depending on how your system is setup, you can use the --uid and --gid to setup the right user or group if you have those permissions setup or you can use the --umask to mount with I personally with 002 for my umask as that gives me rwx for user and group and world is just rx.

–max-read-ahead 80M --transfers 5 --checkers 10 all does nothing with the mount command with the first only being useful if you have a custom compiled kernel. transfers and checkers don’t do anything with the mount command so you could remove them as well.

And lastly, I’m not sure if you are using GD but you want to use the cache as well so you don’t get banned.

Same user. If I type the following, linux will tell me all the relevant services all run by the "pi’ user. mono (for radarr and sonarr) and rclone.

ps - ef

The mount folder has 755 permissions too.

Really? Didn’t know that, thanks for explaining. I’ll remove those then.

Yeah, I’m using GD but didn’t set the cache remote yet, since I have a small library, but I’m working on it. Last time I tried I was having a hard time with the file listing, because I’d send some files from another place with “rclone copy” and they wouldn’t show up in the mounted cached remote.

I think the latest beta has some fixes for the cache polling if I’m not mistaken so give that a look as even with a small library, you run at great risk since the way it grabs files without the cache.

That being said, can you just run a few things and do a couple checks?

[felix@gemini ~]$ ps -ef | grep -i nzbdrone
felix     7100     1  1 07:10 ?        00:02:36 /usr/bin/mono /data/NzbDrone/NzbDrone.exe -nobrowser

[felix@gemini ~]$ ps -ef | grep rclone
felix     3874     1  0 07:09 ?        00:00:52 /usr/bin/rclone mount gmedia: /gmedia --allow-other --dir-cache-time=160h --cache-chunk-size=10M --cache-info-age=168h --cache-workers=5 --cache-tmp-upload-path /data/rclone_upload --cache-tmp-wait-time 60m --buffer-size 0M --syslog --umask 002 --rc --log-level INFO

and do something like an ls -al in your mounted folder to check the permissions:

[felix@gemini gmedia]$ ls -al
total 0
-rw-rw-r-- 1 felix felix 0 Apr 14 11:08 mounted
drwxrwxr-x 1 felix felix 0 Apr 19  2017 Movies
drwxrwxr-x 1 felix felix 0 Apr 18  2017 TV

If all the users match up and the permissions look right, Sonarr should be happy as well. Without the cache and the rclone log, you might be getting some errors though if it isn’t working.

Sure, here it is:

pi 634 1 59 13:40 ? 00:00:24 /usr/bin/mono /opt/NzbDrone/NzbDrone.exe -nobrowser

pi 685 1 1 13:40 ? 00:00:01 /usr/bin/rclone mount gcrypt:Media /home/pi/gdrive --vfs-cache-mode writes --max-read-ahead 80M --transfers 5 --checkers 10 --config /home/pi/.config/rclone/rclone.conf --allow-other

pi@retropie:~/gdrive $ ls -al
total 0
drwxr-xr-x 1 pi pi 0 Apr 24 02:45 Anime
drwxr-xr-x 1 pi pi 0 May 9 22:34 Documentaries
drwxr-xr-x 1 pi pi 0 Apr 23 19:26 Movies
drwxr-xr-x 1 pi pi 0 Apr 23 19:26 Series

and if you put Sonarr in debug, what error are you seeing the logs when you browse?

If I try to browse, no folders of file show up in the mount point: https://imgur.com/a/etJgpYZ

If I force the path to the place files are, Sonarr says:

18-5-11 13:47:30.8|Warn|DiskScanService|Series’ root folder (/home/pi/gdrive/Anime) is empty.

And what does

ls -alR /home/pi/gdrive/Anime

produce from the terminal?

It’s listing all files. Here’s an example:

pi@retropie:~ $ ls -alR /home/pi/gdrive/Anime
/home/pi/gdrive/Anime:
total 0
drwxr-xr-x 1 pi pi 0 Apr 24 21:48 3-gatsu no Lion

Then:

/home/pi/gdrive/Anime/3-gatsu no Lion:
total 0
drwxr-xr-x 1 pi pi 0 Apr 24 21:48 S1
drwxr-xr-x 1 pi pi 0 Apr 24 21:56 S2

/home/pi/gdrive/Anime/3-gatsu no Lion/S1:
total 13762627
-rw-r–r-- 1 pi pi 599077404 Apr 24 15:29 3-gatsu no Lion - 01 [1080p] [MX-EN-PT] [D972909E].mkv

I see some of the files are -rw-r–r–. Could this be a problem?

No, that should be ok. Normally directories have ‘x’ on them so you can change into them, but files or movies with just rw is fine.

We validated all the permissions and running users are good, but you’re still getting what looks to be a permission error.

Only other thing I can think to try is to put rclone is debug mode and you can see what rclone says when you hit browse in Sonarr.

You can use -vvv and the -log-file location to drop it somewhere on your system and see what rclone says when you list out the directory as that’s the last spot I can think to check.

I see, thanks for the help.

I’ll try to set a cache remote and reinstall rclone, sonarr and mono to see what happens.

Thanks for the assistance!

I’m having the same problem as well. Files are viewable in CLI, but Sonarr can’t see any of it. Everything is the same user, I’ve even set most to 777 to try to get it to work.

I did manage to get it to work by fusing rclone mount and another folder, and pointing Sonarr to that. Then I tried using the same method on a VPS, and it won’t see the rclone mount or the fuse.

If I figure out what I am doing wrong I’ll update.

Are you table to add in the rclone log with debug to see what it’s doing?

I got this below. It looks like rclone is receiving Sonarr requests (e.g. I’m trying to set and scan a series called Steins Gate).

2018/05/12 02:28:29 DEBUG : rclone: Version “v1.41” starting with parameters [“rclone” “mount” “gcrypt:Media” “/home/pi/gdrive” “–log-level” “DEBUG” “–log-file” “/home/pi/usb/rclone.txt”]
2018/05/12 02:28:29 DEBUG : Using config file from “/home/pi/.config/rclone/rclone.conf”
2018/05/12 02:28:31 INFO : Encrypted drive ‘gcrypt:Media’: Modify window is 1ms
2018/05/12 02:28:31 DEBUG : Encrypted drive ‘gcrypt:Media’: Mounting on “/home/pi/gdrive”
2018/05/12 02:28:31 DEBUG : Adding path “vfs/forget” to remote control registry
2018/05/12 02:28:31 DEBUG : : Root:
2018/05/12 02:28:31 DEBUG : : >Root: node=/, err=
2018/05/12 02:28:31 DEBUG : Google drive root ‘Backup/Media’: Checking for changes on remote
2018/05/12 02:28:32 DEBUG : Google drive root ‘Backup/Media’: All changes were processed. Waiting for more.
2018/05/12 02:28:47 DEBUG : /: Lookup: name=“Anime”
2018/05/12 02:28:47 DEBUG : /: >Lookup: node=Anime/, err=
2018/05/12 02:28:47 DEBUG : Anime/: Attr:
2018/05/12 02:28:47 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:28:47 DEBUG : Anime/: ReadDirAll:
2018/05/12 02:28:48 DEBUG : Anime/: >ReadDirAll: item=70, err=
2018/05/12 02:28:52 DEBUG : /: Lookup: name=“Anime”
2018/05/12 02:28:52 DEBUG : /: >Lookup: node=Anime/, err=
2018/05/12 02:28:52 DEBUG : Anime/: Attr:
2018/05/12 02:28:52 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:28:52 DEBUG : /: Lookup: name=“Anime”
2018/05/12 02:28:52 DEBUG : /: >Lookup: node=Anime/, err=
2018/05/12 02:28:52 DEBUG : Anime/: Attr:
2018/05/12 02:28:52 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:28:52 DEBUG : Anime/: ReadDirAll:
2018/05/12 02:28:52 DEBUG : Anime/: >ReadDirAll: item=70, err=
2018/05/12 02:28:53 DEBUG : /: Attr:
2018/05/12 02:28:53 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:28:53 DEBUG : /: ReadDirAll:
2018/05/12 02:28:53 DEBUG : /: >ReadDirAll: item=5, err=
2018/05/12 02:28:55 DEBUG : /: Lookup: name=“Anime”
2018/05/12 02:28:55 DEBUG : /: >Lookup: node=Anime/, err=
2018/05/12 02:28:55 DEBUG : Anime/: Attr:
2018/05/12 02:28:55 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:28:55 DEBUG : /: Lookup: name=“Anime”
2018/05/12 02:28:55 DEBUG : /: >Lookup: node=Anime/, err=
2018/05/12 02:28:55 DEBUG : Anime/: Attr:
2018/05/12 02:28:55 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:28:55 DEBUG : Anime/: Lookup: name=“Steins;Gate”
2018/05/12 02:28:55 DEBUG : Anime/: >Lookup: node=, err=no such file or directory
2018/05/12 02:28:55 DEBUG : Anime/: Lookup: name=“Steins;Gate”
2018/05/12 02:28:55 DEBUG : Anime/: >Lookup: node=, err=no such file or directory
2018/05/12 02:28:56 DEBUG : Anime/: ReadDirAll:
2018/05/12 02:28:56 DEBUG : Anime/: >ReadDirAll: item=70, err=
2018/05/12 02:28:58 DEBUG : /: Attr:
2018/05/12 02:28:58 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:28:58 DEBUG : /: ReadDirAll:
2018/05/12 02:28:58 DEBUG : /: >ReadDirAll: item=5, err=
2018/05/12 02:28:58 DEBUG : /: Attr:
2018/05/12 02:28:58 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:00 DEBUG : /: Attr:
2018/05/12 02:29:00 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:00 DEBUG : /: ReadDirAll:
2018/05/12 02:29:00 DEBUG : /: >ReadDirAll: item=5, err=
2018/05/12 02:29:10 DEBUG : /: Attr:
2018/05/12 02:29:10 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:10 DEBUG : /: ReadDirAll:
2018/05/12 02:29:10 DEBUG : /: >ReadDirAll: item=5, err=
2018/05/12 02:29:10 DEBUG : /: Attr:
2018/05/12 02:29:10 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:10 DEBUG : /: ReadDirAll:
2018/05/12 02:29:10 DEBUG : /: >ReadDirAll: item=5, err=
2018/05/12 02:29:10 DEBUG : /: Attr:
2018/05/12 02:29:10 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:10 DEBUG : /: ReadDirAll:
2018/05/12 02:29:10 DEBUG : /: >ReadDirAll: item=5, err=
2018/05/12 02:29:10 DEBUG : /: Attr:
2018/05/12 02:29:10 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:10 DEBUG : /: ReadDirAll:
2018/05/12 02:29:10 DEBUG : /: >ReadDirAll: item=5, err=
2018/05/12 02:29:10 DEBUG : /: Attr:
2018/05/12 02:29:10 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:10 DEBUG : /: ReadDirAll:
2018/05/12 02:29:10 DEBUG : /: >ReadDirAll: item=5, err=
2018/05/12 02:29:14 DEBUG : /: Lookup: name=“Anime”
2018/05/12 02:29:14 DEBUG : /: >Lookup: node=Anime/, err=
2018/05/12 02:29:14 DEBUG : Anime/: Attr:
2018/05/12 02:29:14 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:14 DEBUG : /: Lookup: name=“Anime”
2018/05/12 02:29:14 DEBUG : /: >Lookup: node=Anime/, err=
2018/05/12 02:29:14 DEBUG : Anime/: Attr:
2018/05/12 02:29:14 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:14 DEBUG : Anime/: ReadDirAll:
2018/05/12 02:29:14 DEBUG : Anime/: >ReadDirAll: item=70, err=
2018/05/12 02:29:15 DEBUG : Anime/: Attr:
2018/05/12 02:29:15 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:15 DEBUG : Anime/: ReadDirAll:
2018/05/12 02:29:15 DEBUG : Anime/: >ReadDirAll: item=70, err=
2018/05/12 02:29:15 DEBUG : Anime/: Attr:
2018/05/12 02:29:15 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:15 DEBUG : Anime/: ReadDirAll:
2018/05/12 02:29:15 DEBUG : Anime/: >ReadDirAll: item=70, err=
2018/05/12 02:29:15 DEBUG : Anime/: Attr:
2018/05/12 02:29:15 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:15 DEBUG : Anime/: ReadDirAll:
2018/05/12 02:29:15 DEBUG : Anime/: >ReadDirAll: item=70, err=
2018/05/12 02:29:15 DEBUG : Anime/: Attr:
2018/05/12 02:29:15 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:15 DEBUG : Anime/: ReadDirAll:
2018/05/12 02:29:15 DEBUG : Anime/: >ReadDirAll: item=70, err=
2018/05/12 02:29:15 DEBUG : /: Lookup: name=“Anime”
2018/05/12 02:29:15 DEBUG : /: >Lookup: node=Anime/, err=
2018/05/12 02:29:15 DEBUG : Anime/: Attr:
2018/05/12 02:29:15 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:15 DEBUG : /: Lookup: name=“Anime”
2018/05/12 02:29:15 DEBUG : /: >Lookup: node=Anime/, err=
2018/05/12 02:29:15 DEBUG : Anime/: Attr:
2018/05/12 02:29:15 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:15 DEBUG : Anime/: ReadDirAll:
2018/05/12 02:29:15 DEBUG : Anime/: >ReadDirAll: item=70, err=
2018/05/12 02:29:15 DEBUG : Anime/: Attr:
2018/05/12 02:29:15 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:15 DEBUG : Anime/: ReadDirAll:
2018/05/12 02:29:15 DEBUG : Anime/: >ReadDirAll: item=70, err=
2018/05/12 02:29:27 DEBUG : /: Lookup: name=“Anime”
2018/05/12 02:29:27 DEBUG : /: >Lookup: node=Anime/, err=
2018/05/12 02:29:27 DEBUG : Anime/: Attr:
2018/05/12 02:29:27 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:27 DEBUG : /: Lookup: name=“Anime”
2018/05/12 02:29:27 DEBUG : /: >Lookup: node=Anime/, err=
2018/05/12 02:29:27 DEBUG : Anime/: Attr:
2018/05/12 02:29:27 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:27 DEBUG : Anime/: ReadDirAll:
2018/05/12 02:29:27 DEBUG : Anime/: >ReadDirAll: item=70, err=
2018/05/12 02:29:29 DEBUG : /: Lookup: name=“Anime”
2018/05/12 02:29:29 DEBUG : /: >Lookup: node=Anime/, err=
2018/05/12 02:29:29 DEBUG : Anime/: Attr:
2018/05/12 02:29:29 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:29 DEBUG : /: Lookup: name=“Anime”
2018/05/12 02:29:29 DEBUG : /: >Lookup: node=Anime/, err=
2018/05/12 02:29:29 DEBUG : Anime/: Attr:
2018/05/12 02:29:29 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:29 DEBUG : Anime/: ReadDirAll:
2018/05/12 02:29:29 DEBUG : Anime/: >ReadDirAll: item=70, err=
2018/05/12 02:29:30 DEBUG : /: Attr:
2018/05/12 02:29:30 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:30 DEBUG : /: ReadDirAll:
2018/05/12 02:29:30 DEBUG : /: >ReadDirAll: item=5, err=
2018/05/12 02:29:31 DEBUG : /: Lookup: name=“Anime”
2018/05/12 02:29:31 DEBUG : /: >Lookup: node=Anime/, err=
2018/05/12 02:29:31 DEBUG : Anime/: Attr:
2018/05/12 02:29:31 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:31 DEBUG : /: Lookup: name=“Anime”
2018/05/12 02:29:31 DEBUG : /: >Lookup: node=Anime/, err=
2018/05/12 02:29:31 DEBUG : Anime/: Attr:
2018/05/12 02:29:31 DEBUG : Anime/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2018/05/12 02:29:31 DEBUG : Anime/: Lookup: name=“Steins”
2018/05/12 02:29:31 DEBUG : Anime/: >Lookup: node=, err=no such file or directory
2018/05/12 02:29:31 DEBUG : Anime/: Lookup: name=“Steins”
2018/05/12 02:29:31 DEBUG : Anime/: >Lookup: node=, err=no such file or directory
2018/05/12 02:29:32 DEBUG : Google drive root ‘Backup/Media’: Checking for changes on remote
2018/05/12 02:29:32 DEBUG : Google drive root ‘Backup/Media’: All changes were processed. Waiting for more.
2018/05/12 02:29:45 DEBUG : rclone: Version “v1.41” finishing with parameters [“rclone” “mount” “gcrypt:Media” “/home/pi/gdrive” “–log-level” “DEBUG” “–log-file” “/home/pi/usb/rclone.txt”]

I’ve been trying to get this to work while using plexguide and have been annoyed how all the file paths are mapped differently in each application. I finally figured out how to map directly to the root file system, and I got the mount to appear in sonarr. So I think that was my problem - plexguide’s settings were screwing things up.

It might have been how you deployed it. Works on my 2 vm and 2 main machines fine. We started off with root in PG4, but was a security nightmare to do so.