Permission Issues with SAB in Proxmox LXC (Debian 12)

Support for the Debian/Ubuntu package, created by JCFP.
Forum rules
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.
Post Reply
Plex4Me
Newbie
Newbie
Posts: 9
Joined: June 22nd, 2023, 3:56 am

Permission Issues with SAB in Proxmox LXC (Debian 12)

Post by Plex4Me »

I am having issues with my SAB since installing, I get had it working in the way of receiving the NZB, downloading and storing it but then the 'arr services not having enough rights to the completed downloads.

I also have a question around how best to keep SAB updated because I havent been able to decipher the different methods people have spoken about with how Debian doesnt update traditionally.

I have installed via the following script: https://github.com/tteck/Proxmox/blob/m ... install.sh

I have modified the following in the sabnzbd.service file (note the port number change):

Code: Select all

service_path="/etc/systemd/system/sabnzbd.service"
echo "[Unit]
Description=SABnzbd
After=network.target
[Service]
WorkingDirectory=/opt/sabnzbd
ExecStart=python3 SABnzbd.py -s 0.0.0.0:5006
Restart=always
User=root
[Install]
WantedBy=multi-user.target" >$service_path
systemctl enable --now -q sabnzbd.service
I notice SAB is running as root, when I check the downloaded files it creates, they're obviously owned by root, if I change the permissions manually to someone of my group created 'media' then all my problems go away.

So my logic was I need to get SAB to run as a user in that group, I ran the following commands to create a user

Code: Select all

sudo adduser sabnzbd
add it to the media group

Code: Select all

 sudo usermod -a -G media sabnzbd
then changed my sabnzbd.service file

Code: Select all

service_path="/etc/systemd/system/sabnzbd.service"
echo "[Unit]
Description=SABnzbd
After=network.target
[Service]
WorkingDirectory=/opt/sabnzbd
ExecStart=python3 SABnzbd.py -s 0.0.0.0:5006
Restart=always
User=sabnzbd
[Install]
WantedBy=multi-user.target" >$service_path
systemctl enable --now -q sabnzbd.service
then tried to make sab the owner of the root folders for downloads

Code: Select all

sudo chown sabnzbd:media /mnt/Data/Downloads/Complete/
sudo chown sabnzbd:media /mnt/Data/Downloads/Incomplete/
I was then running

Code: Select all

ps au -C sabnzbd
to check if SAB was running as the user I created, but it keeps defaulting to root,

Code: Select all

root@sab-n-arrs:/etc/systemd/system# ps au -C sabnzbd
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         247  0.0  0.0   2516  1536 pts/0    Ss+  09:25   0:00 /sbin/agetty -o -p -- \u --noclear --keep-baud - 115200,38400,9600 linux
root         248  0.0  0.0   6120  3648 pts/1    Ss   09:25   0:00 /bin/login -p --
root         249  0.0  0.0   2516  1536 pts/2    Ss+  09:25   0:00 /sbin/agetty -o -p -- \u --noclear - linux
root         567  0.0  0.0   6800  4992 pts/1    S    09:25   0:00 -bash
root        1868  0.0  0.0   8100  4224 pts/1    R+   10:13   0:00 ps au -C sabnzbd
wondering if this is because sab is being run by python, which is installed and ran as root?

Am I going about this all wrong? I just need my 'arrs to be able have complete access to read/write to the completed and incomplete download directories.
Post Reply