Does linuxserver respect group_add?

I have the docker container Sonarr, which I want to run as:

  • Primary user: sonarr (uid=3028)
  • Primary group: services (gid=2005)

The user is also a part of this additional groups:

  • media (gid=2002)
  • usenet (gid=2003)

So what I have done in my compose is this:

sonarr:
  environment:
    PUID: 3028 # `sonarr` user
    PGID: 2005 # `services` user
  group_add:
    - 2002 # Media
    - 2003 # Usenet
...

But it doesn’t work for some reason. My suspicion is that linuxserver doesn’t respect the group_add directive?

Yes. It’s easy enough to confirm with docker exec -u abc <container name> id

It shows I’m running as root (uid=0), but I specified PUID=3028, so I assumed exec commands run before linuxserver’s magic (where it starts as root then switches to UID specified in the env variable).

So you’re saying whatever issue I’m having, it isn’t because group_add is ignored? damn it lol, I thought I found the root of my problem.

Thanks anyways

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