Ubuntu 22.04 - Running Sabnzbd with a different group
Posted: March 9th, 2023, 5:19 pm
I recently moved from nzbget, and found no easy way to have sabnzbd enforce group permissions on new files in the completed folder. Here is a little work around....
Modify the file: /etc/default/sabnzbdplus
Add the GROUP variable, the location does not matter, here is what mine looks like:
Save and exit.
Next edit /etc/init.d/sabnzbdplus , there is a few changes here so bare with me...
Line 38, add GROUP to the end:
Line 69, add a new line below like so:
Finally, on line 80 modify the chuid part like so:
Save and quit
Perform a "systemctl daemon-reload" and finally a "service sabnzbdplus restart"
Hopefully this change can make it into the PPA.
Enjoy!
Modify the file: /etc/default/sabnzbdplus
Add the GROUP variable, the location does not matter, here is what mine looks like:
Code: Select all
# [required] user or uid of account to run the program as:
USER=sabnzb
GROUP=media
Next edit /etc/init.d/sabnzbdplus , there is a few changes here so bare with me...
Line 38, add GROUP to the end:
Code: Select all
# these are only accepted from the settings file
unset USER CONFIG HOST PORT EXTRAOPTS GROUP
Code: Select all
[ -n "$EXTRAOPTS" ] && OPTIONS="$OPTIONS $EXTRAOPTS"
[ -n "$GROUP" ] && CHUID="$USER:$GROUP" || CHUID="$USER"
Code: Select all
log_daemon_msg "Starting $DESC"
eval start-stop-daemon --start --quiet --chuid "$CHUID" --exec "$DAEMON" -- $OPTIONS
Perform a "systemctl daemon-reload" and finally a "service sabnzbdplus restart"
Hopefully this change can make it into the PPA.
Enjoy!