Docker Community Forums

Share and learn in the Docker community.

Struggling with volume permissions in Docker with Sonarr

I’m new at this so forgive me if this has been answered elsewhere

Sonarr is up and running fine, I can access the web interface and muck about with configurations. The only thing I can’t do that’s driving me absolutely insane is mount my media drive as the root folder in Sonarr, as I get a permissions issue. I know I have my permissions correct, so here’s my whole setup.

Here is my Compose File


First thing I did was create a sonarr user

sudo useradd sonarr

Next I added this user to my media group which the jackett/sonarr/plex/torrent services share.

sudo usermod -aG media sonarr

I now have a user with a PID of 1002 (sonarr) and a GID of 1001 (media).

My folders are set up as follows

/home/media/tv
/home/media/.config/radarr
/home/media/.download
/home/media

I ran chown to make my media user and group the owner of the media folders

chown -R media:media /home/media
chmod -R 775 /home/media

I then run my docker-compose up -d to start the docker containers.

You’ll notice in my docker compose I’m using the Sonarr PID with the Media GID. That actually blocks me fully from the media folder for some reason.

However I can get Sonarr running if I use the Media PID and Media GID.

So while the container is running as media:media I can now access Sonarr and use the web client and make configuration changes. I’ll be honest, I have no idea where these configurations are stored because my home/media/.config/radarr folder is totally empty but it’s saving everything I do.

Finally I want to mount my /tv directory bound to /media/tv in the Sonarr interfance and attempt to do so in Sonarr’s settings, but nothing happens. Logs show that I have a permissions issue.

Odd thing is if I mount a different folder, let’s say Downloads for example it works fine. Which makes no sense to me because as you can see above the downloads folder is in /home/media also with the same ownership, group and permissions.

I’m running out of ideas and hoping y’all can help

Thanks guys!