Unable to set root data path (docker)

I’m running docker 4.6.1 on windows 10 build 19044.1620. Version is 3.0.7.1477. I have data on a shared drive (t: on the host in this example). My issue is that when I go to set the root data folder in Sonarr settings, I see the directory I want and I choose and save it, but it does not get saved. Other configuration changes are saved ok. I’ve tried a umask of 022. All my puid and pgid are the same. Perhaps that isn’t correct. I’m guessing its a permissions issue, but I’m relatively new to linux. Here’s the docker-compose and then a look at some permissions from within the container:

version: “3.8”
services:
overseerr:
image: linuxserver/overseerr:latest
container_name: overseerr
restart: unless-stopped
environment:
- TZ=America/New_York # Specify a timezone to use
- PUID=1000 # User ID to run as
- PGID=1000 # Group ID to run as
- UMASK=022
volumes:
- c:\pvr\overseerr_config:/config # Contains all relevant configuration files.
ports:
- 5055:5055 # Web UI
prowlarr:
image: linuxserver/prowlarr:0.2.0-nightly
container_name: prowlarr
restart: unless-stopped
environment:
- TZ=America/New_York # Specify a timezone to use
- PUID=1000 # User ID to run as
- PGID=1000 # Group ID to run as
- UMASK=022
volumes:
- c:\pvr\prowlarr_config:/config # Contains all relevant configuration files.
ports:
- 9696:9696 # Web UI
sonarr:
image: linuxserver/sonarr:latest
container_name: sonarr
restart: unless-stopped
environment:
- TZ=America/New_York # Specify a timezone to use
- PUID=1000 # User ID to run as
- PGID=1000 # Group ID to run as
- UMASK=022
volumes:
- t::/data # Location of all your media
- c:\pvr\sonarr_config:/config # Contains all relevant configuration files.
ports:
- 8989:8989 # Web UI
bazarr:
image: linuxserver/bazarr:latest
container_name: bazarr
restart: unless-stopped
environment:
- TZ=America/New_York # Specify a timezone to use
- PUID=1000 # User ID to run as
- PGID=1000 # Group ID to run as
- UMASK=022
volumes:
- c:\pvr\bazarr_config:/config # Bazarr data
ports:
- 6767:6767/tcp # Allows HTTP access to the internal webserver.
radarr:
image: linuxserver/radarr:latest
container_name: radarr
restart: unless-stopped
environment:
- TZ=America/New_York # Specify a timezone to use
- PUID=1000 # for UserID
- PGID=1000 # for GroupID
- UMASK=022
volumes:
- c:\pvr\radarr_config:/config # Database and Radarr configs
ports:
- 7878:7878/tcp # The port for the Radarr webinterface
tautulli:
image: tautulli/tautulli:latest
container_name: tautulli
restart: unless-stopped
environment:
- TZ=America/New_York # Specify a timezone to use
- PUID=1000 # User ID to run as
- PGID=1000 # Group ID to run as
- UMASK=022
volumes:
- c:\pvr\tautulli_config:/config # Contains all relevant configuration files.
ports:
- 8181:8181 # Web UI
qbittorrent:
image: linuxserver/qbittorrent:latest
container_name: qbittorrent
restart: unless-stopped
environment:
- TZ=America/New_York # Specify a timezone to use
- PUID=1000 # User ID to run as
- PGID=1000 # Group ID to run as
- UMASK=022
volumes:
- c:\pvr\qbittorrent_config:/config # configs
ports:
- 8080:8080
- 6881:6881
- 6881:6881/udp

# ls -l
total 112
drwxr-xr-x   1 abc  abc   4096 Apr  5 09:48 app
drwxr-xr-x   1 root root 12288 Mar 29 00:55 bin
drwxr-xr-x   2 root root  4096 Apr 24  2018 boot
drwxrwxrwx   1 abc  abc   4096 Apr 11 10:13 config
drwxr-xr-x   5 root root  4096 Apr  7 06:59 data
drwxr-xr-x   1 abc  abc   4096 Mar 29 00:56 defaults
drwxr-xr-x   5 root root   340 Apr 11 10:12 dev
-rwxrwxr-x   1 root root  3579 Mar 29 00:54 docker-mods
-rwxrwxr-x   1 root root    33 Apr  5 09:47 donate.txt
drwxrwxr-x   1 root root  4096 Apr 11 10:12 etc
drwxr-xr-x   2 root root  4096 Apr 24  2018 home
-rwxr-xr-x   1 root root   389 Feb 15  2021 init
drwxr-xr-x   1 root root  4096 Mar 29 00:55 lib
drwxr-xr-x   2 root root  4096 Mar 29 00:55 lib64
drwxr-xr-x   2 root root  4096 Mar 29 00:55 libexec
drwxr-xr-x   2 root root  4096 Mar 17 19:19 media
drwxr-xr-x   2 root root  4096 Mar 17 19:19 mnt
drwxr-xr-x   2 root root  4096 Mar 17 19:19 opt
dr-xr-xr-x 254 root root     0 Apr 11 10:12 proc
drwx------   2 root root  4096 Mar 29 00:55 root
drwxr-xr-x   1 root root  4096 Apr 11 10:12 run
drwxr-xr-x   1 root root  4096 Mar 29 00:55 sbin
drwxr-xr-x   2 root root  4096 Mar 17 19:19 srv
dr-xr-xr-x  11 root root     0 Apr 11 10:12 sys
drwxrwxrwt   1 root root  4096 Apr  5 09:48 tmp
drwxrwxr-x   1 root root  4096 Mar 29 00:54 usr
drwxr-xr-x   1 root root  4096 Mar 29 00:55 var
#

Here are the log entries:

2022-04-12 16:37:01.8|Warn|SonarrErrorPipeline|Invalid request Validation failed:
– Path: Folder is not writable by user abc
2022-04-12 16:37:53.4|Warn|SonarrErrorPipeline|Invalid request Validation failed:
– Path: Folder is not writable by user abc

Don’t docker on windows as it’s extremely complex to do right and requires knowledge of windows, WSL, and docker. It also comes with a long list of nuances and limitations.

Dockering on windows with 0 experience requires the extreme complexity of learning WSL on windows, docker, Linux, and the *arr apps themselves. That’s like trying to jump straight to the 3rd year of med school after graduating middle school.

Just run the apps natively on windows.

Why are you trying to use docker on windows?

The user and group you configured sonarr to run under does not have read and write permissions to the path - exactly as the error says

Based on your configured paths in your compose you’ll be unable to ever use the apps because you only are passing a config mount and nothing more except for Sonarr…where it’s just an invalid path.

t:

Is likely not a valid windows path.

I’m also guessing that’s a network drive? Getting windows mounted network drives to play nice with docker on windows is an entire additional load of complicated complexity and learning experience. Besides everything else already mentioned of course.

https://wiki.servarr.com/docker-guide

Why is Prowlarr pinned to a specific - out of date - version?

Thanks for the reply. I do have a setup running on windows 10 as windows apps. I only found overseerr available as a docker image, so I started down the path of docker for windows. (I preferred overseerr over petio or ombi). So my thought is, if I need docker anyway, it would be a much cleaner install and much easier to maintain in the long run. I feel I’m pretty close except for setting the permissions and the interaction with the windows file system for the root data folder.

In this docker compose (in first post), I’m trying to figure figure out the permission issue first with Sonarr, then I will add the appropriate paths for the other apps. Sonarr seemed like the easiest way to demonstrate the issue through trying to set the root data folder.

You are correct, T:\ is a mapped drive on the windows host machine which maps to a windows server. When running Sonarr, I do see the directory structure under T:\ where I planned to choose the appropriate directory. It just won’t save because of the permissions.

I feel that I’m really close. I feel like I"m pretty deep into the learning curve on most of this (except the linux part). So I’ve done a lot of work, but am willing to do more to get it across the finish line.

Good catch for Prowlarr - I think that was the recommended label a few weeks ago when I started on this.

So I think it comes down to how to have docker container running wsl2 access a host shared windows drive with read/write. That seems like something that someone has figured out.

If you

docker exec -u abc -it sonarr bash

into your sonarr container, you could do an ls -l /data to see if the files are there, mounted and what the permissions are. Chances are the user “abc” does not have write permissions to that directory. You could try

touch /data/file

to see if you can create /data/file. My guess is you’ll get a permissions problem.

Hmm… Let’s see, it’s been about 8 years since I had to touch a Windows box but IIRC, in order to access a shared drive Windows requires that it knows both the username and the user’s password in order to grant access to the user. The username used in the docker container is ‘abc’ but that is mapped to UID 1000 GID 1000 in the docker container via /etc/passwd. For accessing NFS shares (Unix’s way of accessing file systems on remote machines) all you need is UID and GID. But Windows is different and needs both username and password.

I found this out when trying to use Cygwin’s (a WSL-like environment) to ssh into a Windows box that accessed a remotely mapped drive. I had set up the ssh to use pre-shared key meaning passwordless login (secured instead by a pre-shared key). When done this way I could not access the UNC path at all. I believe it said “UNAVAILABLE” because Windows did not have the user’s password to use. If I instead supplied the username and password when ssh’ing in it would work.

One way to test if this is indeed the case is to ditch the whole T: drive thing and temporarily create say C:\data and map that to the docker container’s /data directory and perhaps C;\series to /series. Then go in using docker exec again and see if you can create the /data/file. I suspect you will be able to.

So how to solve this? Well, there’s a very kludgey way of modifying the Windows registry to allow access when the password is not known but I would not recommend against such an approach. I’m assuming your T drive and other things are on your big honking Plex server thus not local and you are running this docker container on say your desktop which doesn’t have those big drives. I’d say you’re the best bet is to instead set up this docker stuff on the same system that houses your T drive. Then it would local access to the large file systems.

I think your docker things should run on the Plex server where the data is local to avoid these permissions problems. I run a Synology NAS which is at its heart a Linux system. So is docker - it was born on Linux and IIRC didn’t work on Windows for quite some time. All of my docker containers run on Synoiogy and all my other systems (desktop, laptop) also run Linux. So I’m very comfortable with ssh’ing into my Synology or other systems and sharing file systems using good ole (and much quicker) NFS.

Good luck

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.