Permission issues with sonarr


#1

Hi,
Ive followed the guide for sonarr here - https://hub.docker.com/r/linuxserver/sonarr/ and i seem to be running into permission issues inside the container-

docker logs -f sonarr
    -------------------------------------
GID/UID
-------------------------------------
User uid:    1000
User gid:    1000
-------------------------------------
usermod: Failed to change ownership of the home directorychown: changing ownership of '/config': Permission denied
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing... 
[cont-init.d] 30-config: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[Info] Bootstrap: Starting Sonarr - /opt/NzbDrone/NzbDrone.exe - Version 2.0.0.5252 
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
[Trace] DiskProviderBase: Directory '/config' isn't writable. Access to the path "/config/sonarr_write_test.txt" is denied. 
[Fatal] ConsoleApp: EPIC FAIL! 
[v2.0.0.5252] NzbDrone.Common.Exceptions.SonarrStartupException: Sonarr failed to start: AppFolder /config is not writable
  at NzbDrone.Common.EnvironmentInfo.AppFolderFactory.Register () [0x0007c] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\EnvironmentInfo\AppFolderFactory.cs:50 
  at NzbDrone.Host.Bootstrap.Start (NzbDrone.Common.EnvironmentInfo.StartupContext startupContext, NzbDrone.Host.IUserAlert userAlert, System.Action`1[T] startCallback) [0x00050] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Host\Bootstrap.cs:36 
  at NzbDrone.Console.ConsoleApp.Main (System.String[] args) [0x00029] in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Console\ConsoleApp.cs:37 
Press enter to exit...
Non-recoverable failure, waiting for user intervention...

Command used to create container:

$ docker create --name sonarr -p 8989:8989 -e PUID=1000 -e PGID=1000 -v /etc/localtime:/etc/localtime:ro -v /leech/docker/sonarr:/config -v /leech/Shows:/tv -v /leech/Downloads:/downloads linuxserver/sonarr

I have full ownership of the host folders:

$ ll /leech
total 0
drwxrwxr-x. 3 filebox filebox 20 Nov 7 18:04 docker
drwxrwxr-x. 2 filebox filebox 6 Nov 7 16:48 Downloads
drwxrwxr-x. 2 filebox filebox 6 Nov 7 16:48 Shows

id:

$ id
uid=1000(filebox) gid=1000(filebox) groups=1000(filebox),10(wheel),1001(docker)

Can someone please tell me whats going wrong as ive really exhausted my troubleshooting skills.


#2

What is the OS? It seems docker cannot write to the location as even the chown fails.

Is that location a local path or remote?


#3

Fedora 29. Im using docker installed from the fedora repo as the docker-ce is not available yet.

Its a local path.

I just found out that docker is creating the volume as root if the host folder does not exist. I made sure the /leech/docker/sonarr folder was removed and created the container with the command. The folder was created and it was owned by root. Any way i can fix this?


#4

Docker runs as root (it should at least) and will create folders as root. Our container runs a script during start to change ownership of those folders to puid selected. In your case, for some reason, docker is not able to do so.

I suspect it’s an issue with your docker build. What is the docker version?


#5

docker version
Client:
Version: 1.13.1
API version: 1.26
Package version: docker-1.13.1-62.git9cb56fd.fc29.x86_64
Go version: go1.11beta2
Git commit: accfe55-unsupported
Built: Wed Jul 25 18:54:07 2018
OS/Arch: linux/amd64

Server:
Version: 1.13.1
API version: 1.26 (minimum version 1.12)
Package version: docker-1.13.1-62.git9cb56fd.fc29.x86_64
Go version: go1.11beta2
Git commit: accfe55-unsupported
Built: Wed Jul 25 18:54:07 2018
OS/Arch: linux/amd64
Experimental: false

Im using docker installed from the fedora official repos.


#6

That’s a really old build. I recommend installing from the official docker repo.


#7

I guess ill wait for a docker-ce repo for fedora 29. Thank you for your help :slight_smile:


#8

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