Running nzbget as a different user

Get help, report and discuss bugs.
gapone
Posts: 17
Joined: 23 Apr 2017, 15:49

Running nzbget as a different user

Post by gapone » 23 Apr 2017, 15:56

Hi! I'm running Openmediavault v2 latest (debian wheezy) and I have the nzbget v18.1 running. I configured my server to use split vpn tunneling (services running on 'vpn' user connects through my vpn service) and now I need to change nzbget user to vpn. What is the easiest way to do it? I tried to change "daemonusername=vpn # system vpn", but it didn't work. Thanks in advance...

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Running nzbget as a different user

Post by hugbug » 23 Apr 2017, 16:07

It depends how you start nzbget.
For example if you start manually from terminal nzbget will run under the same user you are logged in.
If you have some boot scripts you should use the properties of boot system to change user name for the service. See topic http://forum.nzbget.net/viewtopic.php?f=8&t=2709.

gapone
Posts: 17
Joined: 23 Apr 2017, 15:49

Re: Running nzbget as a different user

Post by gapone » 23 Apr 2017, 16:20

hugbug wrote:It depends how you start nzbget.
For example if you start manually from terminal nzbget will run under the same user you are logged in.
If you have some boot scripts you should use the properties of boot system to change user name for the service. See topic http://forum.nzbget.net/viewtopic.php?f=8&t=2709.
It starts on boot with sysv init but I don't know how to change the user.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Running nzbget as a different user

Post by hugbug » 23 Apr 2017, 16:31

Then setting option "daemonusername" in NZBGet should be sufficient.
Make a test: set the option, then open a terminal session with root user and start nzbget with "nzbget -D". NZBGet should run under "vpn" user account. If that works then the start from says init script should work too (make sure you start nzbget with "-D").

gapone
Posts: 17
Joined: 23 Apr 2017, 15:49

Re: Running nzbget as a different user

Post by gapone » 23 Apr 2017, 16:38

hugbug wrote:Then setting option "daemonusername" in NZBGet should be sufficient.
Make a test: set the option, then open a terminal session with root user and start nzbget with "nzbget -D". NZBGet should run under "vpn" user account. If that works then the start from says init script should work too (make sure you start nzbget with "-D").
Now I remember. I tried this also and saw that it was running as vpn but the web server doesn't work now. So now it's running as vpn but web server doesn't work.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Running nzbget as a different user

Post by hugbug » 23 Apr 2017, 16:40

Have you changed port in NZBGet from standard 6789?

gapone
Posts: 17
Joined: 23 Apr 2017, 15:49

Re: Running nzbget as a different user

Post by gapone » 23 Apr 2017, 16:44

hugbug wrote:Have you changed port in NZBGet from standard 6789?
I'm using 8200 and 8201 (ssl).

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Running nzbget as a different user

Post by hugbug » 23 Apr 2017, 16:59

Have you checked nzbget log-file?
Maybe there is a permission issue and user vpn can't read webui directory or other errors.

gapone
Posts: 17
Joined: 23 Apr 2017, 15:49

Re: Running nzbget as a different user

Post by gapone » 23 Apr 2017, 18:17

hugbug wrote:Have you checked nzbget log-file?
Maybe there is a permission issue and user vpn can't read webui directory or other errors.
Yes I did and nothing to see there. I took ownership for nzbget folder also and no help.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Running nzbget as a different user

Post by hugbug » 23 Apr 2017, 18:26

Have you tried this?
Then setting option "daemonusername" in NZBGet should be sufficient.
Make a test: set the option, then open a terminal session with root user and start nzbget with "nzbget -D". NZBGet should run under "vpn" user account.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 40 guests