Running sabnzbd as a different user

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
Rumbles
Newbie
Newbie
Posts: 10
Joined: March 11th, 2012, 5:06 am

Running sabnzbd as a different user

Post by Rumbles »

Hi, I have been trying to set sab up as a different user, I have it running fine as either root or my own user, but if I run it as user sabnzb it fails:

Code: Select all

sudo service sabnzbdplus start
 * Starting SABnzbd+ binary newsgrabber                                                                            Traceback (most recent call last):
  File "/usr/bin/sabnzbdplus", line 1678, in <module>
    main()
  File "/usr/bin/sabnzbdplus", line 992, in main
    res, msg = config.read_config(inifile)
  File "/usr/share/sabnzbdplus/sabnzbd/decorators.py", line 31, in newFunction
    return f(*args, **kw)
  File "/usr/share/sabnzbdplus/sabnzbd/config.py", line 652, in read_config
    CFG = configobj.ConfigObj(path)
  File "/usr/lib/python2.7/dist-packages/configobj.py", line 1230, in __init__
    self._load(infile, configspec)
  File "/usr/lib/python2.7/dist-packages/configobj.py", line 1237, in _load
    h = open(infile, 'rb')
IOError: [Errno 13] Permission denied: '/home/username/.sabnzbd/sabnzbd.ini'
                                                                                                            [fail]
The user has group privlidges to the file:

Code: Select all

ll /home/username/ | grep sab
drwxrwxr-x  4 stock admin  4096 2012-03-12 00:21 .sabnzbd/

Code: Select all

sudo grep sabnzb /etc/group
admin:x:113:username,username2,sabnzb
sabnzb:x:1005:
I would log in as that user and try running it and see what happens but I have forgotten the password. Do I ened to do this or can I try something else? If I have to log in as this user can I just delete the password from the apssword file and create a new one?
User avatar
sander
Release Testers
Release Testers
Posts: 8830
Joined: January 22nd, 2008, 2:22 pm

Re: Running sabnzbd as a different user

Post by sander »

Most easy way: reset the unknown password with "sudo passwd <username>". Then login as that user and run sabnzbd to see if it works. If so, you can fill out that user in /etc/default/sabnzbdplus
Rumbles
Newbie
Newbie
Posts: 10
Joined: March 11th, 2012, 5:06 am

Re: Running sabnzbd as a different user

Post by Rumbles »

Thanks sander, when I log in as sabnzb I get the following:

Code: Select all

 sabnzbdplus
Traceback (most recent call last):
  File "/usr/bin/sabnzbdplus", line 1678, in <module>
    main()
  File "/usr/bin/sabnzbdplus", line 985, in main
    os.makedirs(sabnzbd.DIR_LCLDATA)
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/home/sabnzb'
Any ideas?
User avatar
jcfp
Release Testers
Release Testers
Posts: 989
Joined: February 7th, 2008, 12:45 pm

Re: Running sabnzbd as a different user

Post by jcfp »

These are simply a permission problem. The relevant user needs at least +x on the entire directory chain, write access to the ini and that dir. Also, if you created a new user specifically for sab, make sure the user actually has a home dir (at system level) set and that it exists with proper permissions.
Post Reply