Page 1 of 1

Can't start service as non-root

Posted: August 26th, 2015, 8:48 am
by rakem
I'm trying to run sabnzdb as a non-root user but it the service fails to start when it is configured this way.

Code: Select all

me@storage:~$ sudo service sabnzbdplus start
 * Starting SABnzbd+ binary newsgrabber                                                                                                         [fail]
me@storage:~$ service sabnzbdplus start
 * Starting SABnzbd+ binary newsgrabber                                                                                                         [fail]
config file looks like this:

Code: Select all

@storage:~$ cat /etc/default/sabnzbdplus
# This file is sourced by /etc/init.d/sabnzbdplus
#
# When SABnzbd+ is started using the init script, the
# --daemon option is always used, and the program is
# started under the account of $USER, as set below.
#
# Each setting is marked either "required" or "optional";
# leaving any required setting unconfigured will cause
# the service to not start.

# [required] user or uid of account to run the program as:
USER=me

# [optional] full path to the configuration file of your choice;
#            otherwise, the default location (in $USER's home
#            directory) is used:
CONFIG=

# [optional] hostname/ip and port number to listen on:
HOST=127.0.0.1
PORT=

# [optional] extra command line options, if any:
EXTRAOPTS=
I have full sudo permissions, so not sure why its not working.
I can run 'sabnzbdplus' from my account and the program starts, but just not as a service... any thoughts?

The problem is, when sabnzb downloads stuff it creates folders using the root account. I also use sonarr to organise stuff, which runs as a non-root user and it can't access the folders that sabnzb is creating under root

Re: Can't start service as non-root

Posted: August 26th, 2015, 1:50 pm
by shypike
I cannot see which port you are using, but any port below 1024 requires root privileges.