Folder not writeable by user abc

I’m running sonarr in docker. Everything appears to work OK apart from some permissions issue with folders. When I go to add a TV series and choose ‘Add a different path’ and browse for a path most directories appear blank (apart from /).

I can’t see any folders in /home/.

If I select any directory and click the check mark to test it I get an error returned ‘Folder is not writable by user abc’.

I found a thread elsewhere https://forum.linuxserver.io/thread-212.html that suggests it’s because I don’t have my PUID and PGID variable set when I set up the container, but they’re both set to 1001, which is the ID of the user I want it to run as.

If I do ps -aux I can see that mono is running as my user also.

I thought to run ‘id’ from within the docker container and it is running as id 0, root. I listed all users in the container and abc is one of them and its uid is 1000. What have I done wrong?

I’m sorry if the problem or solution is obvious but I’m really new to linux and feel way over my head. It’s actually very frustrating.

You’ll probably want to set PUID and PGID to a user outside the container that has the proper access to the folders (as listed in the readme for the container: https://github.com/linuxserver/docker-sonarr).

Yes, sorry if I didn’t put that clearly. The user outside the container that I want them to run as has the UID/GID 1000 which is user ‘mediaman’. Inside the container that UID belongs to a user named ‘abc’.

abc is the user within the container, it will use the PUID and PGID if set though.

Did you mount any paths like the readme shows under usage? AFAIK you won’t have access to /home you need to mount it to a folder that the container can access.

I just noticed that the tv folder is available as /tv (as in, in the root directory). However I get the same error message as before.

This is how I created the container:

sudo docker create --name=sonarr --restart=always -p 8989:8989 -e PUID=1000 -e PGID=1000 -v /dev/rtc:/dev/rtc:ro -v /home/mediaman/sonarr/config:/config -v /home/mediaman/sonarr/tv:/tv -v /home/mediaman/sonarr/downloads:/downloads linuxserver/sonarr

Do you want it to use 1000 or 1001? You mention 1001, but your config uses 1000.

Sorry. I meant 1000. 1001 was a typo, edited my response above.

Okay, I just wanted to make sure it wasn’t something simple.

And the mediaman user has read and write access to /home/mediaman/sonarr/tv? It should since it’s a subfolder of the home folder, but what do you get it you run ls -la /home/mediaman/sonarr/tv?

What if you map it to a different folder outside of the home directory?

I’m having this issue too. Running sonarr in a FreeNAS Corral docker setup. All permissions for the folders appear correct, owned by shared:shared, correct uid and gid… a bit lost!

It’s best to put all of your torrent / newsgroup daemons / web services / sonarr / radarr into a single group and then give that group write permission somewhere on the drive. I also setup a cronjob to double check the permissions of the drive in case something wrote a file there that isn’t editable/writeable by everyine in the group (and it fixes it if that happens.)

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