"Read-only file system" when importing files after last update

Sonarr version (exact version): 4.0.10.2544
Mono version (if Sonarr is not running on Windows): 6.12.0.206-1
OS: Manjaro Linux
Debug logs: PrivateBin (PW: Sonarr2024! )
Description of issue:

After updating from 4.0.9.2244 to 4.0.10.2544, importing files fails with the exception “System.IO.IOException: Read-only file system”. I don’t know if the Sonarr update or maybe a Mono update is to blame.

I have double and triple-checked, and neither the target nor the source are a read-only filesystem. I have tried reading, creating and deleting files with the sonarr user in the respective directories and it works fine.

Here is how I checked permissions and the file system: PrivateBin (PW: Sonarr2024! )

The target is a network share mounted via /etc/fstab, no problems up until now:

//10.1.1.99/media    /home/(redacted)/media    cifs    username=(redacted),password=(redacted),x-systemd.automount,x-systemd.requires=network-online.service,uid=(redacted),gid=(redacted),dir_mode=0770,file_mode=0660,rw,user,users,async,auto,nofail    0       0

Please help! Thank you very much in advance!

I am a bit confused because you are running V4 Sonarr and still showing Mono. Since .NET was ported to Linux, Sonarr switched to it and stopped using Mono as of V4.

This is what my Sonarr looks like…

Do you have .NET installed in Linux?

Thanks for your answer. That’s my bad then, I was just assuming it was still Mono. It looks the same for me:

image

Did you previously run V3 Sonarr and upgrade to V4? If you did there is a change you need to make to the Systemd service file so it no longer loads mono (if you haven’t already made that change). You would be able to tell by the “ExecStart” entry would have “mono” as part of the command.

This is from the V4 upgrade steps at the top of this page…

Thanks, but that’s not it:
image

I remember making that change, but I think it was on my previous machine. I think on this one I started with V4 already.

Anyway, as I said, everything was working fine with 4.0.9.2244.

So I made a .NET 6.0 console application in Linux using Rider with the same code as in NzbDrone.Mono.Disk.DiskProvider and related classes and it worked fine when running it using the sonarr user. I am very confused :frowning:

I also tried running Sonarr using my user and got the same exception. So it definitely shouldn’t be a simple permissions problem.

Any ideas how to debug this?

I had the same problem last night, the problem is the AUR package maintainer hardening the package and poorly documenting the changes he made. To fix this issue do the following.

systemctl edit sonarr
inside the editor, paste the following, these changes will persist among package updates so it wont break in the future.

[Service]
# allow home share path to be writable again
ReadWritePaths=/home/user/media
1 Like

//10.1.1.99/media /home/(redacted)/media cifs username=(redacted),password=(redacted),x-systemd.automount,x-systemd.requires=network-online.service,uid=(redacted),gid=(redacted),dir_mode=0770,file_mode=0660,rw,user,users,async,auto,nofail 0 0

missing nobrl

Wow, thank you so much! I saw the changes he made to the service file, but would have never guessed that it results in this error.

It works now, many thanks again!

Thanks for the hint. I never had problems without this parameter, but I added it nonetheless to be safe.