Windows SMB passing through to Linux Dockers, permissions?

sonarr
#1

Hello,
I’m having problems with Sonarr (but im sure will also see it in radarr, lidarr, nzbget, etc etc)

I’m running a windows file server (due to a legacy reason), presented as \\server\folder\ with full read/write to user1, both ntfs and share permissions.

Tried a few different methods to present the SMB share to the linux dockers, settled on mounting /mnt/folder on my host and passing it through as a volume (rw).
This is working fine and I can even use touch to create a file from the sonarr container console (root) but not the user that is running the sonarr service.
However if I look at chmod for the mount inside the container sonarr its 755 rather than 777 and im unable to change it. As sonarr runs as a different user than root it does not have write permission to /mnt/folder and I’m guessing this is the cause of my problems.

I have tried to sudo chmod but the container does not have sudo, I have tried to umount the location and see if it lets me edit it while its not mounted but this also failed.

I would really appreciate a hand getting this working, hopefully in a simple manner that doesnt require me to edit much with every container update.

Thank You

#2

Solved:

The problem is both my OS and my Docker console are root (UID 0) but Sonarr is running as UID 1000 (user: abc)
I had to go back to the host OS, change my mount options to include 777 permissions.

sudo mount -t cifs //server/folder /mnt/folder-o user=user1,dir_mode=0777,file_mode=0777

Hope this helps someone in the future.