Radarr: Path: Folder '/data/' is not writable by user 'abc'

I’m trying to setup my first homeserver with pods alone but I can’t add my mounted /data (it’s an external HDD) folder to the root folder, but the /app and /config works. It’s a common issue but somehow I wasn’t able to solve it.

OS: Rocky Linux 9.3

External HDD (WD Elements)

external HDD in /etc/fstab:


<span style="color:#323232;"># WD Elements drive
</span><span style="color:#323232;">UUID=4655386a-5ccf-4c7b-ad6a-c0b90ccf8454 /home/privatenoob/media/storage1 xfs defaults 0 0
</span>

radarr.service:


<span style="color:#323232;">[Unit]
</span><span style="color:#323232;">Description=Radarr Movie Server
</span><span style="color:#323232;">After=network.target
</span><span style="color:#323232;">
</span><span style="color:#323232;">[Service]
</span><span style="color:#323232;">ExecStart=podman run --name=radarr -e PUID=1000 -e PGID=1000 -e UMASK=002 -p 7878:7878 -v radarr-config:/config -v /home/privatenoob/media/storage1/Filmek:/data --restart unless-stopped lscr.io/linuxserver/radarr:latest
</span><span style="color:#323232;">ExecStop=podman stop radarr
</span><span style="color:#323232;">Restart=on-failure
</span><span style="color:#323232;">
</span><span style="color:#323232;">[Install]
</span><span style="color:#323232;">WantedBy=default.target
</span>

Permissions:


<span style="color:#323232;">drwxr-xr-x. 2 privatenoob privatenoob 6 Jan 17 16:52 Filmek
</span><span style="color:#323232;">
</span><span style="color:#323232;">drwxr-xr-x   4 abc    users    139 Jan 18 19:44 config
</span><span style="color:#323232;">drwxr-xr-x   2 root   root       6 Jan 17 15:52 data
</span>

chown -R 1000:1000 /data didn’t work. It gave permission denied, even though I used root (probably this is because of -e PUID=1000?)

Shjosan, (edited )
@Shjosan@sopuli.xyz avatar

Drop the / in “/data” for the chown command. Now it is looking for a data folder in root, and not the one in “Filmek”.

Don’t know if it will help with your issue thou

un_ax,

Try running the chown outside of the container: chown -R 1000:1000 /home/privatenoob/media/storage1/Filmek

PrivateNoob,

Doesn’t work either with both running this before starting/building the container and also while running it. Thanks for the help tho!

djoot,

On my OpenSuse server I had to add :Z after /data in the bind, dont know if it applies to your setup, but it is easy to test and see if it works

PrivateNoob,

It doesn’t even start unfortunately, but thanks for your help tho!

genie,

There are a few ways around it. The simplest is to add the –privileged option.

The more secure method with podman is by specifying a user (ex -u 10001:10001) from your extended subuid:subgid range after your full and proper setup of rootless podman :-)

Then instead of chown you’ll want to use the oddly named podman unshare tool to automatically set the permissions of the host directory. You would then want to start your service with systemctl --user instead of sudo systemctl

PrivateNoob, (edited )

Okay so I’ve done these steps (it seems rootless podman have been setup by Rocky automatically):

  1. Get subuid:subgid with /etc/subuid:

privatenoob:100000:65536

2.:Changed ExecStart to this:

ExecStart=podman run --name=radarr -u 100000:65536 -p 7878:7878 -v radarr-config:/config -v /home/privatenoob/media/storage1/Filmek:/data --restart unless-stopped lscr.io/linuxserver/radarr:latest

3.: podman unshare chown -R 100000:65536 /home/privatenoob/media/storage1/Filmek/

Unfortunately unsharing gave me invalid arguments.

chown: changing ownership of ‘/home/privatenoob/media/storage1/Filmek/’: Invalid argument

I have tried by leaving the -e PUID=1000 parts on but those didn’t work either. Yeah and I’m using systemctl --user. Thanks for your help!

genie,

Ah! I think I see the confusion.


<span style="font-style:italic;color:#969896;"># /etc/subuid
</span><span style="color:#323232;">privatenoob:100000:65536
</span>

This denotes the range of subuids that are available to your user.

-u 100000:65536

This part specifies two things ([UID]:[GID]) even though it’s the same syntax as the earlier part that specifies one range :)

I suspect what you will want to do is use the following:


<span style="font-style:italic;color:#969896;"># change ownership of the directory to the UID:GID that matches something in your subuid:subgid range, in this case 10000:10000
</span><span style="color:#323232;">podman unshare chown -R 100000:10000 /home/privatenoob/media/storage1/Filmek/
</span>

Then we can specify that the user in the container can match the user (UID) we specified above:


<span style="color:#323232;">ExecStart</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">podman </span><span style="color:#323232;">run --name</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#323232;">radarr -u 10000:10000 -p 7878:7878 -v radarr-config:/config -v /home/privatenoob/media/storage1/Filmek:/data --restart unless-stopped lscr.io/linuxserver/radarr:latest
</span>

As a note, if you copy/pasted that ExecStart line, you might have gotten the invalid argument error because you entered 100000 (outside of your subuid range, i.e. >65536) instead of 10000.

There’s a nice guide that gives a great walkthrough. I’ll dig through my bookmarks and add it here when I get some time.

Hope this helps!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • selfhosted@lemmy.world
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #