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?
What default?
I’m guessing one of the services makes that change on startup. Start them one by one and see. Then check its configuration.
Personally I just run them in containers. Much less mess.
yep this, going to find some docker compose file with everything and strip it back to what I want
I’ve been trying to do the same with this Plex & *arr stack, but am brand new to docker and dont know what I’m doing.
https://github.com/DonMcD/ultimate-plex-stackit’s high time to consider jellyfin. plex is moving streaming to their paid subscription
What is it you don’t understand, perhaps I can guide you.
Do you have any technical knowledge? Like navigating systems or any programming experience?
I only ask those as if yes, then watching a couple of videos about docker-compose should be sufficient. Once you have an understanding of what it does you can rely on the docs more then.
Even asking ChatGPT for an example docker-compose file for what you want would be a great start.
I often find, and its true in this case, that the guides I see show detailed installation instructions, and then say ‘then simply replace the variables in the config, et voila’.
I have my variables, but dont know where, or exactly how to put them in the docker compose file. Like do I replace all of them? Do I need the ‘$’ signs?Anyway, you’re right, some videos should make it easier. I’ll have a look, thanks.
I’m still working on learning about containers but not quite there yet.
Default being, when each service is installed it creates an individual user/group (sonarr, radarr, sabnzbd) and the folder that is created in /var/lib/ for each service is set to those particular users/groups.
At this time, sonarr and radarr seem to be ok (I will need to double check after an update to them) but SABnzbd reverts the folder permissions every time I reboot and complains whenever I reboot since it can’t write to the db or log files because the permissions change. I have looked at the config but didn’t see anything outstanding that would indicate a reason it would be changing. Unless I am missing a different config file somewhere outside of that folder. There aren’t any settings from within the web interface pointing to that either, at least from what I could see.
Are you mounting a FAT32 disk by any chance?
Nope, I’m running ext4 on pretty much everything.
That is not normal. I have much the same setup, sabnzbd, Plex, jellyfin, sonar, radar. They all run under a particular user and their /opt and /var/lib folders don’t ‘revert’ to their old ownership and permissions.
Either something is watching those folders and setting permissions, or some kind of immutability is in play, but permissions normally don’t revert like that.
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.
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.
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.
Good stuff!
I recommend this guy: https://youtube.com/@serversathome
While I don’t think this is exactly what you want, it should have some handy info.