Some basic help needed by NZBGet Newbie

Get help, report and discuss bugs.
Post Reply
BlindFish
Posts: 6
Joined: 03 May 2019, 16:03

Some basic help needed by NZBGet Newbie

Post by BlindFish » 03 May 2019, 16:40

Hello,
i have to admit that i am pretty new to NZBGet and also linux, which, in combination, can be a pretty frustrating task to handle.

My installation of NZBGet running on Ubuntu 18.04 is doing pretty well so i tried to work on a first script to post-process some stuff after NZBGet has finished working on it.

First Question: NZBGet process shows that it is run by 'root'. Should this be changed? If so, how would i do this? I've managed to install an autostart service for NZBGet right now.

Second Question: All files and directories show that the belong to user and group 'root', although this is not the user i am using on a daily basis. However, i would have assumed that scripts ran by NZBGet would also be executed under user 'root' but this doesn't seem to be the case as NZBGet seems unable to access / create files which are referenced within the script.

Also, when checking the scripts directory, there are two example scripts which show "1001" as the user and group id. When i try to identify the user and group associated with id 1001, by 'id 1001' i get an error message telling me that no such user exists.

So maybe someone is willing to clarify things for me here a little bit.

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

Re: Some basic help needed by NZBGet Newbie

Post by hugbug » 03 May 2019, 18:35

BlindFish wrote:
03 May 2019, 16:40
NZBGet process shows that it is run by 'root'. Should this be changed? If so, how would i do this? I've managed to install an autostart service for NZBGet right now.
Running by root isn't good. If nzbget is launched in daemon mode (nzbget -D) then the user account can be set in NZBGet via option "DaemonUsername". If however nzbget is started in server mode (nzbget -s) then it runs under the account it was launched. Check your service file. It either uses "-D" to start nzbget (then use option "DaemonUsername" in nzbget) or if it uses "-s" then the service file most likely has parameters to configure user account.

As user account you can use your normal account or a new account specially for nzbget. The latter requires understanding of users and groups concept and maybe more difficult to setup though.

Once you have nzbget running under correct user account the other issues will probably solve on their own. You may need to change owner or permissions for existing destination directories (which are owned by root currently); alternatively delete them and let nzbget recreate them from the correct user account.

BlindFish
Posts: 6
Joined: 03 May 2019, 16:03

Re: Some basic help needed by NZBGet Newbie

Post by BlindFish » 05 May 2019, 15:39

Thanks for your answer.

As i am just trying to build a solid foundation of knowledge when it comes to linux, it might be a good approach to aim for a working setup and refining things afterwards, esp. when it comes to access permissions. Out of the box, nzbget seems to have installed itself with a full set of required permissions, as the service itself and all nzbget related directories belong to user / group 'root'. And the basic functions are also working as expected right now.

Insted of dealing with my own script, i've tried to use a pre-built one and put it into the 'scripts' folder of nzbget, taking care of the permissions, of course. I have configured the script (videosort) and have made it available to my movies and series categories. For testing, i've tried to post-process an already downloaded item by picking it from the history and assigning the videosort script. But nothing happens. There isn't even a log entry neither in the item log nor in the global nzbget log.

So my guess would be that i am missing a really basic / global part here to make this work and it shouldn't have to do anything with permissions right now.

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

Re: Some basic help needed by NZBGet Newbie

Post by hugbug » 05 May 2019, 21:00

Use command "Post-processed again" if you want to rerun the (whole) postprocessing for history items.

Furthermore since postprocessing often moves files somewhere doing postprocessing multiple times may not work the same as once after downloading.

BlindFish
Posts: 6
Joined: 03 May 2019, 16:03

Re: Some basic help needed by NZBGet Newbie

Post by BlindFish » 06 May 2019, 07:20

Thanks a lot!

I didn't see there was a menu command to re-start post-processing again. Now it worked as intended and i will go on with my own script and putting permissions in the right place.

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests