Sonarr cache not writable

I am trying to import a bunch of TV shows from a rclone cache mounted drive, when I try and do this, Sonarr tells me that the directory isn’t writable by user ‘root’.

My service:

[Unit]
Description=RClone Service
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/rclone mount gmedia: /gmedia --config /mnt/storage/rclone.config --cache-tmp-upload-path=/mnt/storage/rclone_upload_tmp --allow-other --dir-cache-time=160h --cache-chunk-size=10M --cache-info-age=168h --cache-workers=5 --cache-tmp-upload-path /mnt/storage/rclone_upload --cache-tmp-wait-time 60m --buffer-size 0M --syslog --umask 002 --rc --log-level INFO
ExecStop=/usr/bin/sudo /usr/bin/fusermount -uz /gmedia
Restart=on-abort

[Install]
WantedBy=default.target

Has anyone had this before?

What user are you running Sonarr as?

I’m running it as a default users, equiv of 911 I think.

I’ve tried using root using PUID=0 PGUID=0.

I still get the same error

What are the permissions on the mount path ?

Mine is mounted to /GD and looks like:

felix@gemini:/$ ls -al | grep GD
drwxrwxr-x   1 felix felix     0 Nov 12 10:08 GD

What happens if you create a file as the same user ? Does that work? Is there an error in the rclone log?

root@Jupiter / # ls -al | grep gmedia
drwxrwxr-x 1 root root 0 Nov 12 14:52 gmedia

And the second part? Did you try to write a file as the same user? Is there an error in the rclone log?

2018/11/12 16:35:28 NOTICE: Serving remote control on http://127.0.0.1:5572/
2018/11/12 16:37:06 INFO : Media/TV/sonarr_write_test.txt: Copied (new)

That’s the rclone log, it looks like Sonarr is writing to it… I can write when logged into the container, I’m not sure how I use the same user inside the container that Sonarr is using.

So that looks like it worked? What’s the error?

Oh man, this was such a stupid issue. I deleted ‘sonarr_write_test.txt’ and it now works.

I love these types of issues :smiley:

OMG! Spent an hour on this! Glad i decided to just read everything from google I could