I’m trying, and struggling a little bit with getting the three items in the title setup the way that I want.

Running Arch.

I would like to run Radarr, Sonarr and SABnzbd all under the same user/group. My reasoning is that I (am just being overly particular) want any of the files created by those services to fall under the same owner/group. This is easy enough to accomplish by running systemctl edit service.service and adding the appropriate lines in the configuration for each one and saving it so the services run using the specified user/group.

The issue that I’m having is that the correlating folders in /var/lib/ have the ownership of the original users. I can manually change that ownership to the user/group I want but if I reboot the computer the SABnzbd folder ownership reverts back to default (the other two were doing the same thing but suddenly stopped and I’m not 100% sure why) or if the services get updated, the folders will also revert back to their default user/group.

Is there a way for me to enforce the ownership of those folders to the user/group that I have set to run the services regardless of them getting updated or the machine rebooting?

  • skizzles@lemmy.worldOP
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    6 days ago

    Interesting, was there anything in particular that you did with the services other than editing the service to run as those particular users?

    Side note, I just tried to chown the sabnzbd folder and everything inside updated but the main folder itself refuses to change. Even after stopping the service.

    Edit: scratch that. I closed and re-opened Dolphin and checked the properties of the folder and now it’s showing correctly.

    • non_burglar@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      6 days ago

      I just vi the systemd/system/fancyname.service files father than use systemd edit, but I think the result is the same.

      There are two configs you can add to the [service] directive:

      user=someuser

      This should allow you to run the service under the credentials of your choosing.

      Remember to systemctl daemon-reload after making changes to unit files.

      • skizzles@lemmy.worldOP
        link
        fedilink
        arrow-up
        1
        ·
        5 days ago

        Ok, yeah.

        Fell asleep last night sorry.

        I did the following for that. I just went and double checked it and it is set to what I want it to.

        [Service]
        User=username
        Group=groupname
        

        Ok, I’m not entirely sure what happened but it’s working now. Just restarted my computer and it didn’t revert.

        Strange.