Debian install doesn't work wont run as normal user

Get help with all aspects of SABnzbd
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.
jp73
Newbie
Newbie
Posts: 13
Joined: February 26th, 2009, 10:07 am

Debian install doesn't work wont run as normal user

Post by jp73 »

hi
I used this link to get it installed
http://sabnzbd.wikidot.com/quick-setup
it is installed on a debian server with no graphicall interface.

I noticed it was installed in the root folder and could only be run as root. I moved te folder to my home folder but it won't run as the regular user. Then I deleted the sabnzbd folder and reinstalled, even found a link for 0.4.6 and used that.
Got the tar xf SABnzbd-0.4.5-src.tar
file into my homedirectory but it won't work as normal user only as root.

anyone can help me to install it in the home folder of a normal user and be able to run it as user not root ?


thanks

I have been installing and deleting the folder and hope I didn't mess it up too bad
User avatar
sander
Release Testers
Release Testers
Posts: 9061
Joined: January 22nd, 2008, 2:22 pm

Re: Debian install doesn't work wont run as normal user

Post by sander »

It would help if you would post all commands and output and interaction here.

The instruction on http://sabnzbd.wikidot.com/quick-setup#toc1 should work. Important: run as normal user in your home directory.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Debian install doesn't work wont run as normal user

Post by shypike »

Possibly SABnzbd cannot detect your home folder.
You can help it by using the -f option:

Code: Select all

./SABnzbd.py -f /MY_PATH/sabnzbd.ini
The default location for sabnzbd.ini is ~/.sabnzbd,
but you are free to put it anywhere else (where you have write permission).
Last edited by shypike on February 27th, 2009, 6:24 am, edited 1 time in total.
jp73
Newbie
Newbie
Posts: 13
Joined: February 26th, 2009, 10:07 am

Re: Debian install doesn't work wont run as normal user

Post by jp73 »

OK
thanks for the help, I deleted all files I could find from sabnzdb, and went trough the steps again.

It al worked ok, have the version 0.4.6 now. I started the program from the SABnzbd folder with python SABnzbd.py
and I get in my textscreen the page from SABnzdb.

Thereafter I restarted the server to start clean and added the option -b 0 so it wouldn't start a local webbrowser.

then it shows in my terminal screen this line as last

27/Feb/2009:14:11:51 HTTP INFO Serving HTTP on http://localhost:8080/

But when I type in my webbrowser   http://192.168.1.200:8080/ I get the message that the browser can't make a connection

also when I type http://192.168.1.200:8080/sabnzbd/  I get this message

Any solutions ??


Something else I noticed, I'm trying all this by ssh-ing into my debian computer and then in the console work via my macbook.
Now just I'm sitting behind a ubuntu pc, going into the SABnzbd-0.4.6 folder and trying to start SABnzdb with the same command as before:  python SABnzbd.py -b 0    and I now get an error :

Error:
Can't write to logfile.

a minute later I tried via the macbook and there it starts ?? (but still nothing via the webbrowser)
Last edited by jp73 on February 27th, 2009, 8:56 am, edited 1 time in total.
User avatar
sander
Release Testers
Release Testers
Posts: 9061
Joined: January 22nd, 2008, 2:22 pm

Re: Debian install doesn't work wont run as normal user

Post by sander »

jp73 wrote:
But when I type in my webbrowser   http://192.168.1.200:8080/ I get the message that the browser can't make a connection

also when I type http://192.168.1.200:8080/sabnzbd/  I get this message

Any solutions ??

Yes: read http://sabnzbd.wikidot.com/configure-general , first paragraph "Host".
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
jp73
Newbie
Newbie
Posts: 13
Joined: February 26th, 2009, 10:07 am

Re: Debian install doesn't work wont run as normal user

Post by jp73 »

sander wrote:
jp73 wrote:
But when I type in my webbrowser   http://192.168.1.200:8080/ I get the message that the browser can't make a connection

also when I type http://192.168.1.200:8080/sabnzbd/  I get this message

Any solutions ??

Yes: read http://sabnzbd.wikidot.com/configure-general , first paragraph "Host".
You got me puzzled for quite a while until I read what I posted before and loked at the message 

so starting with : python SABnzbd.py -b 0 -s 192.168.1.200:8080

did the trick and I got it now in the webbrowser    ;D 

thanks a lot , now I have to figure out how to get SABnzb running in the background and starting up and shutting down when I boot the server ..... any hints for this ?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Debian install doesn't work wont run as normal user

Post by shypike »

jp73 wrote: thanks a lot , now I have to figure out how to get SABnzb running in the background and starting up and shutting down when I boot the server ..... any hints for this ?
How about reading the Wiki:
http://sabnzbd.wikidot.com/install-as-a-unix-daemon
jp73
Newbie
Newbie
Posts: 13
Joined: February 26th, 2009, 10:07 am

Re: Debian install doesn't work wont run as normal user

Post by jp73 »

Hi

yes I've seen this page, problem is that I don't exactly know what to do with it.... I can copy past it into nano and change this: replace sabuser with the proper user account and HOSTADDRESS:PORT by the proper address and port.

But then where to put it and how ? As a text file ?

I'll continue to google for info about scripts but it's not really clear to me





So I've adapted the file, just don't know what to do with  /usr/bin/wget and /usr/bin/sudo

do I have to change this path also ?

below is what I have now, SABnzbd is in the following folder :  /home/jeroen/SABnzbd-0.4.6

if i type whoami I get jeroenpeters

so is below correct ?


#!/bin/sh

case "$1" in
start)
  echo "Starting SABnzbd."
  /usr/bin/sudo -u jeroenpeters -H /usr/local/src/SABnzbd/SABnzbd.py -d -f /home/jeroenpeters/.sabnzbd/sabnzbd.ini
;;
stop)
  echo "Shutting down SABnzbd."
  /usr/bin/wget -q --delete-after "http://192.168.1.200:8080/sabnzbd/api?mode=shutdown"
;;
*)
  echo "Usage: $0 {start|stop}"
  exit 1
esac

exit 0
Last edited by jp73 on February 27th, 2009, 2:51 pm, edited 1 time in total.
jp73
Newbie
Newbie
Posts: 13
Joined: February 26th, 2009, 10:07 am

Re: Debian install doesn't work wont run as normal user

Post by jp73 »

OK

Ive put the script in /etc/init.d/SABnzbd

then I ran chmod 755 /etc/init.d/SABnzbd

then I ran update-rc.d SABnzbd defaults

But it doesn't work and I'm stuck here, I really need some help with this......

below the contens of the script, I don't know if its modified alright....




#!/bin/sh

case "$1" in
start)
  echo "Starting SABnzbd."
  /usr/bin/sudo -u jeroenpeters -H /home/jeroen/SABnzbd/SABnzbd.py -d -f
/home/jeroen/.sabnzbd/sabnzbd.ini
;;
stop)
  echo "Shutting down SABnzbd."
  /usr/bin/wget -q --delete-after "http://192.168.1.200:8080/sabnzbd/api?mode=shutdown"
;;
*)
  echo "Usage: $0 {start|stop}"
  exit 1
esac

exit 0



thanks



- If I run /etc/init.d/SABnzbd start


I get

Starting SABnzbd.
sudo: /home/jeroen/SABnzbd/SABnzbd.py: command not found
/etc/init.d/SABnzbd: line 7: /home/jeroen/.sabnzbd/sabnzbd.ini: Toegang geweigerd


(Toegang geweigerd means access denied)

Any idea ??
Last edited by jp73 on February 28th, 2009, 3:18 am, edited 1 time in total.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Debian install doesn't work wont run as normal user

Post by shypike »

jp73 wrote: sudo: /home/jeroen/SABnzbd/SABnzbd.py: command not found
Yes, I think the path "/home/jeroen/SABnzbd/SABnzbd.py" is wrong.
Where did you install SABnzbd?
jp73
Newbie
Newbie
Posts: 13
Joined: February 26th, 2009, 10:07 am

Re: Debian install doesn't work wont run as normal user

Post by jp73 »

/home/jeroen/SABnzbd-0.4.6

these files are in here :


.              COPYRIGHT.txt  interfaces   PKG-INFO    Sample-PostProc.cmd
..             GPL2.txt       ISSUES.txt   README.txt  Sample-PostProc.sh
CHANGELOG.txt  GPL3.txt       licenses     sabnzbd
cherrypy       INSTALL.txt    LICENSE.txt  SABnzbd.py


I see , I changed /home/jeroen/SABnzbd/SABnzbd.py to /home/jeroen/SABnzbd-0.4.6/SABnzbd.py


by running /etc/init.d/SABnzbd start


I get :


Usage: SABnzbd.py [-f ]

Options marked [*] are stored in the config file

Options:
  -f  --config-file   Location of config file
  -s  --server   Listen on server:port [*]
  -t  --templates   Template directory [*]
  -2  --template2   Secondary template dir [*]

  -l  --logging     Set logging level (0= least, 2= most) [*]
  -w  --weblogging   Set cherrypy logging (0= off, 1= on) [*]

  -b  --browser     Auto browser launch (0= off, 1= on) [*]
  -d  --daemon            Fork daemon process
      --permissions        Set the chmod mode (e.g. o=rwx,g=rwx) [*]

      --force              Discard web-port timeout (see Wiki!)
  -h  --help              Print this message
  -v  --version            Print version information
  -c  --clean              Remove queue, cache and logs
  -p  --pause              Start in paused mode
/etc/init.d/SABnzbd: line 7: /home/jeroen/.sabnzbd/sabnzbd.ini: Toegang geweigerd


(Toegang geweigerd means access denied)
Last edited by jp73 on February 28th, 2009, 4:03 am, edited 1 time in total.
User avatar
sander
Release Testers
Release Testers
Posts: 9061
Joined: January 22nd, 2008, 2:22 pm

Re: Debian install doesn't work wont run as normal user

Post by sander »

jp73 wrote:
/etc/init.d/SABnzbd: line 7: /home/jeroen/.sabnzbd/sabnzbd.ini: Toegang geweigerd


(Toegang geweigerd means access denied)
This is basic Linux stuff. Think "root" versus normal user ... look at the file /home/jeroen/.sabnzbd/sabnzbd.ini (tip: "ls -al /home/jeroen/.sabnzbd/sabnzbd.ini"). And  reread the beginning of this thread ...
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Debian install doesn't work wont run as normal user

Post by shypike »

The folder /home/jeroen/.sabnzbd does not exist.
You must create it first:

Code: Select all

mkdir /home/jeroen/.sabnzbd
jp73
Newbie
Newbie
Posts: 13
Joined: February 26th, 2009, 10:07 am

Re: Debian install doesn't work wont run as normal user

Post by jp73 »

Hi

it exists

these file are in /home/jeroen/


drwxrwxrwx 8 jeroenpeters users    4096 feb 27 14:06 .
drwxr-xr-x 6 root        root      4096 feb 26 09:42 ..
-rwxrwxrwx 1 jeroen      jeroen    5840 feb 28 09:43 .bash_history
-rwxrwxrwx 1 jeroenpeters users      220 feb 22 14:17 .bash_logout
-rwxrwxrwx 1 jeroenpeters users    3116 feb 22 14:17 .bashrc
drwxr-xr-x 4 jeroenpeters users    4096 feb 27 14:06 downloads
drwxrwxrwx 2 jeroenpeters users    4096 feb 23 07:38 .mc
-rwxrwxrwx 1 jeroenpeters users      675 feb 22 14:17 .profile
-rwxrwxrwx 1 root        root      3691 feb 24 22:59 .rtorrent.rc
drwxr-xr-x 4 jeroenpeters users    4096 feb 27 14:06 .sabnzbd
drwxr-xr-x 6 jeroenpeters users    4096 feb 27 14:04 SABnzbd-0.4.6
-rwxr-xr-x 1 jeroenpeters users  2959360 dec 11 23:30 SABnzbd-0.4.6-src.tar
drwxrwxrwx 2 jeroenpeters users    4096 feb 22 16:49 .ssh
drwx------ 2 root        root      4096 feb 26 14:42 .w3m
jeroenpeters@BP6:~$


And I changed the folder  ls -al /home/jeroen/.sabnzbd/sabnzbd.ini
-rwxr-xr-x 1 jeroenpeters users 1974 feb 28 08:11 /home/jeroen/.sabnzbd/sabnzbd.ini

so that this folder kan be written to.

if now I    etc/init.d/SABnzbd start

I get all this...........


et
jeroenpeters@BP6:~$ /etc/init.d/SABnzbd start
Starting SABnzbd.

Usage: SABnzbd.py [-f ]

Options marked [*] are stored in the config file

Options:
  -f  --config-file   Location of config file
  -s  --server   Listen on server:port [*]
  -t  --templates   Template directory [*]
  -2  --template2   Secondary template dir [*]

  -l  --logging     Set logging level (0= least, 2= most) [*]
  -w  --weblogging   Set cherrypy logging (0= off, 1= on) [*]

  -b  --browser     Auto browser launch (0= off, 1= on) [*]
  -d  --daemon            Fork daemon process
      --permissions        Set the chmod mode (e.g. o=rwx,g=rwx) [*]

      --force              Discard web-port timeout (see Wiki!)
  -h  --help              Print this message
  -v  --version            Print version information
  -c  --clean              Remove queue, cache and logs
  -p  --pause              Start in paused mode
/home/jeroen/.sabnzbd/sabnzbd.ini: line 1: __version__: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 2: [misc]: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 3: log_dir: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 4: auto_browser: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 5: permissions: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 6: check_new_rel: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 7: replace_spaces: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 8: replace_illegal: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 9: fail_on_crc: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 10: enable_filejoin: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 11: enable_unzip: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 12: enable_unrar: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 13: auto_disconnect: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 14: enable_par_cleanup: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 15: par_option: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 16: no_dupes: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 17: config_lock: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 18: safe_postproc: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 19: pause_on_post_processing: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 20: cleanup_list: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 21: ignore_samples: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 22: send_group: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 23: download_dir: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 24: download_free: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 25: complete_dir: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 26: script_dir: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 27: nzb_backup_dir: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 28: cache_dir: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 29: dirscan_dir: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 30: dirscan_speed: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 31: refresh_rate: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 32: rss_rate: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 33: bandwith_limit: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 34: cache_limit: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 35: email_server: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 36: email_to: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 37: email_from: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 38: email_account: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 39: email_pwd: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 40: email_endjob: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 41: email_full: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 42: schedlines: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 43: dirscan_opts: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 44: dirscan_script: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 45: top_only: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 46: auto_sort: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 47: enable_tv_sorting: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 48: tv_sort_string: command not found
none: prio 4
/home/jeroen/.sabnzbd/sabnzbd.ini: line 50: web_color: command not found
/home/jeroen/.sabnzbd/sabnzbd.ini: line 51: web_color2: command not found
;; connection timed out; no servers could be reached
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Debian install doesn't work wont run as normal user

Post by shypike »

Code: Select all

  /usr/bin/sudo -u jeroenpeters -H /home/jeroen/SABnzbd/SABnzbd.py -d -f
/home/jeroen/.sabnzbd/sabnzbd.ini
Don't tell me these are actually two lines!

It should be this:

Code: Select all

  /usr/bin/sudo -u jeroenpeters -H /home/jeroen/SABnzbd/SABnzbd.py -d -f /home/jeroen/.sabnzbd/sabnzbd.ini
Post Reply