Sonarr and SAMBA mounted network drive

I have mounted a samba share from my NAS into DietPi and provided the username and password to connect to the share. That all seems to work fine.

But in Sonarr when I try and add /mnt/jessica_tvshows/ nothing seems to happen. And I see this in the sonarr logs… I guess I’m missing something?

21-12-2 09:21:49.1|Warn|SonarrErrorPipeline|Invalid request Validation failed:
– Path: Folder is not writable by user sonarr

This is from the Drive Manager
/mnt/jessica_tvshows : //192.168.10.212/TVShows | cifs | Capacity: 21.8T | Used: 2.5T (11%)

The problem is with read/write access permissions, as mentioned in the log.
What is the output of ls -la /mnt/jessica_tvshows ?

I guess it will be root as it’s Samba mount. Could you share

cat /etc/fstab

Thanks for the help…

root@T620-03:/# ls -la /mnt/jessica_tvshows
total 21394116
drwxrwx--- 2 dietpi dietpi          0 Dec  2 03:48  .
drwxr-xr-x 7 root   root         4096 Dec  2 09:09  ..
drwxrwx--- 2 dietpi dietpi          0 Dec  1 18:57 '12 Monkeys'



//192.168.10.212/TVShows /mnt/jessica_tvshows cifs cred=/var/lib/dietpi/dietpi-drive_manager/mnt-jessica_tvshows.cred,iocharset=utf8,uid=dietpi,gid=dietpi,file_mode=0770,dir_mode=0770,vers=3.1.1,nofail,noauto,x-systemd.automount

I guess I was assuming the network credentials I typed in when setting up the mapped drive would be used but sounds like there is more to it?

yes your samba credentials are used to login to samba server. But this has nothing to do on how permission are set up on your system. As Samba did not support Unix file system permission, a local user is used to reflect this. Actually user dietpi is the one owning the share as you can see on your output.

However we setup Sonarr in a way to be able to write to folder owned by dietpi group. Could you check it pls

groups sonarr
sudo -u sonarr touch /mnt/jessica_tvshows/demo.file
ls -la /mnt/jessica_tvshows

This is the output from those commands…

root@T620-03:/# groups sonarr
sudo -u sonarr touch /mnt/jessica_tvshows/demo.file
ls -la /mnt/jessica_tvshows
sonarr : dietpi
total 21394116
drwxrwx--- 2 dietpi dietpi          0 Dec  2  2021  .
drwxr-xr-x 7 root   root         4096 Dec  2 09:09  ..
drwxrwx--- 2 dietpi dietpi          0 Dec  1 18:57 '12 Monkeys'

Could you run them again, one by one? Although there is no error message after the touch command, the file doesn’t seem to be there.

Here they are one by one…

root@T620-03:/# groups sonarr
sonarr : dietpi



ls -la /mnt/jessica_tvshows
-rwxrwx--- 1 dietpi dietpi          0 Dec  3 10:09  demo.file

I didn’t see any error when the sudo command created the demo.file… And I can see the file is in the folder on my NAS.

This looks normal to me. User sonarr is able to write in the directory. Most likely sonarr has some other type of checking the write permissions, like the owner of the file. Could you try to add the same folder in sonarr and verify if the error persists?

That’s super weird now it seems to be working fine in Sonarr? I can’t say I’ve specifically changed anything though so who knows!
Thanks for your help…

is sonarr the only one writing to this samba share?