Hello!
I have setup sabnzbd on a few containers/vms recently but this last one is causing me issues. I am running 4.3.2 on the latest Debian and need the service to run as a specific user:group. However, when I start it, it runs as user:user, which causes issues with folder permissions for other applications. I have edited etc/default/sabnzbdplus with USER=user:group and have verified that the user (my account) and group is listed on the system.
The previous version I was running was 4.2.3, which had the same settings and worked. The service now runs as [email protected] and that is different than on 4.2.3. Something must have changed in the update(s).
Thank you for any assistance!
Run sabnzbd as specific user:group [Debian]
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- Tell us what system you run SABnzbd on.
- Adhere to the forum rules.
- Do you experience problems during downloading?
Check your connection in Status and Interface settings window.
Use Test Server in Config > Servers.
We will probably ask you to do a test using only basic settings. - Do you experience problems during repair or unpacking?
Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
-
- Newbie
- Posts: 3
- Joined: June 15th, 2024, 7:29 am
Re: Run sabnzbd as specific user:group
? maybe related to https://github.com/sabnzbd/sabnzbd/comm ... 279f2675ac ?
so: does 4.3.1 run OK for you?
so: does 4.3.1 run OK for you?
Re: Run sabnzbd as specific user:group
It did indeed: a native systemd service was added, as the init.d compatibility layer we relied upon to mostly avoid systemd until now has been deprecated. The init.d script is still installed with the package for anyone truly allergic to systemd, and the new systemd service parses the same old settings file in /etc/default which should make this switch go unnoticed for 99.9% of users.Lustily4025 wrote: ↑June 15th, 2024, 7:39 amHowever, when I start it, it runs as user:user, which causes issues with folder permissions for other applications. I have edited etc/default/sabnzbdplus with USER=user:group and have verified that the user (my account) and group is listed on the system.
The previous version I was running was 4.2.3, which had the same settings and worked. The service now runs as [email protected] and that is different than on 4.2.3. Something must have changed in the update(s).
The sole feature that wouldn't carry over is the hidden but long supported option of using the USER variable to set a user:group combo. Systemd apparently - documentation isn't their forte either - lacks support for taking a service's user and group from variables beyond their so-called "specifier" (the %I in the service definition), so mechanisms such as ExecStartPre cannot be used for this purpose. After parsing the service settings file both user and group are known, but we're left with no decent way to actually set the group.
As a workaround, you could try using an override to set the group via:
Code: Select all
systemctl edit [email protected]
As always, hints for improvements are welcome; the relevant files are installed as:
/lib/systemd/system/sabnzbdplus.service
/lib/systemd/system/[email protected]
For now, the new systemd stuff is only shipped in Debian unstable/testing (and backports/derivatives thereof), as well as on the Ubuntu PPA for 24.10/oracular.
-
- Newbie
- Posts: 3
- Joined: June 15th, 2024, 7:29 am
Re: Run sabnzbd as specific user:group
I tried your suggestion of but it gave me an error when I saved it (my knowledge at this level is pretty low). However, I edited and added a line with Group=name. I have no downloads pending, so I tried exporting a backup, which had the correct permissions.
I will continue to monitor this and see if it works.
Thank you for your assistance!!
Code: Select all
systemctl edit [email protected]
Code: Select all
/lib/systemd/system/[email protected]
I will continue to monitor this and see if it works.
Thank you for your assistance!!
Re: Run sabnzbd as specific user:group
Probably needs 'sudo' in front, the override file is stored somewhere in /etc iirc.
Direct edits to /lib/systemd/system/[email protected] will also work, but probably get overwritten whenever the sabnzbdplus package receives updates.
-
- Newbie
- Posts: 3
- Joined: June 15th, 2024, 7:29 am
Re: Run sabnzbd as specific user:group [Debian]
I definitely used sudo to edit the service, the issue is, it wants to save a file called After changing the file to override.conf and a lot of searching online, I was able to get it updated. In case anyone else searches for this topic and gets this thread, I had to add
Between the comments. It finally seems to work. Clearing the old group before setting a new group was the final missing piece. Good thing someone else already had this issue on askubuntu[dot]com! I removed any changes to the file in /lib/systemd/system/[email protected] so I would not have to worry about an update reverting it.
Thank you for your assistance and I hope this works!
Code: Select all
.#override.conf1fc616b1d84007dd
Code: Select all
[Service]
Group=
Group=media
Thank you for your assistance and I hope this works!