Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
danfozzy wrote:
Change:
/usr/bin/sudo -u root -H /root/sabnzbd/SABnzbd.py -d -f /root/.sabnzbd/sabnzbd.ini
To:
/usr/bin/sudo -u root -H /home/tommymsw/sabnzbd/SABnzbd.py -d -f /home/tommymsw/.sabnzbd/sabnzbd.ini
Install sudo before you restart to see if it starts
To check if it is in the folder I believe it's in, on your nas look in the squeeze/home/tommymsw folder
Made corrects in guide using "newuser" directory. Also I had added "sudo" as part of the installs when I first updated.
Please confirm
Offline
danfozzy wrote:
Type
update-rc.d sabnzbd defaults
( it will make sab a service, it will prob mention the mediaservers.sh script, ignore it)
And then the bit in his guide were it says to edit the linuxrc file, we're he has put:
# START SABnzbd
/etc/init.d/sabnzbd
Change it to:
# START SABnzbd
service sabnzbd start
Corrected...please review
Offline
Danfozzy, what user is starting SickBeard, CouchPotato and Headphones in your setup.
In my case it is not root and I am not seeing any issues like tommymsw.
Normally, not good practice to run applications as root if you don't have to.
Offline
I've got everything running as user danfozzy, no snags at all
i his problem was trying to chmod the folders when logged in as his user, and not as root or using the sudo command - as you mentioned he's prob installed sick beard as root
from what i can understand his sick beard folder is still not chmod 777, but running as root will get by this
i agree with you, i don't run any app as root, not even sabnzbd (is that your startup script on the front page)
Last edited by danfozzy (2012-02-25 16:55:09)
Offline
danfozzy wrote:
I've got everything running as user danfozzy, no snags at all
i his problem was trying to chmod the folders when logged in as his user, and not as root or using the sudo command - as you mentioned he's prob installed sick beard as root
from what i can understand his sick beard folder is still not chmod 777, but running as root will get by this
i agree with you, i don't run any app as root, not even sabnzbd (is that your startup script on the front page)
I thought it was but it turns out I did edit it correctly in my script. I guess I am smarter than I look.
/usr/bin/sudo -u newuser -H /newuser/sabnzbd/SABnzbd.py -d -f /newuser/.sabnzbd/sabnzbd.ini
BTW, Did you install sabnzbdplus and just not use it? These were in my original instructions...
So you think that "sh: cannot create /dev/null: Permission denied" issue is because he installed it his home directory as root?
Last edited by Terrabyte (2012-02-25 17:51:38)
Offline
yes. thats how i have it
just a note that you need to add the user to the sudo list to allow sudo to work correctly when using it as a normal user.
I've always used sab i don't get what you mean? I've always installed and run it as danfozzy?
yup, i think so, as sick-beard can't create the required folders, but as root it can, its a permission thing
Last edited by danfozzy (2012-02-25 17:53:10)
Offline
danfozzy wrote:
just a note that you need to add the user to the sudo list to allow sudo to work correctly when using it as a normal user.
How do I do that just so I know. I usually just su.
danfozzy wrote:
I've always used sab i don't get what you mean?
Disregard, thought it had something to with permission issue
What are your permissions for /dev/null? (644 on mine)
What are your permissions for SABnzbd, SickBeard, etc directory? (755 on mine)
Last edited by Terrabyte (2012-02-25 18:01:50)
Offline
644 dev/null
777 for sickbeard, etc
as root, type:
visudo
then under root ALL=(ALL) ALL type:
newuser ALL=(ALL) ALL
it means you don't have to change user when using su, instead just use sudo
Last edited by danfozzy (2012-02-25 18:08:05)
Offline
So going back and fourth like I did, I may have indeed installed some of these programs as "root". Do I need to uninstall them? Or can I just start over again from that part? I have not started using them yet so I don't mind re-installing. The root-user thing is confusing to me. I was wondering what the use of a user is if all could be done as root anyway?
Offline
tommymsw wrote:
So going back and fourth like I did, I may have indeed installed some of these programs as "root". Do I need to uninstall them? Or can I just start over again from that part? I have not started using them yet so I don't mind re-installing. The root-user thing is confusing to me. I was wondering what the use of a user is if all could be done as root anyway?
It is a security thing, but for the time being let's check to see who created those folders.
SSH as newuser
$cd /home/newuser
$ls -al
Post results here...btw if you see "newuser" (aka your user name) than there is a very good chance you created it and not root.
Offline
Hmm... looks like they are all under the newuser?
drwxrwxrwx 6 tommymsw tommymsw 4096 Feb 24 04:17 .
drwxr-xr-x 4 root root 4096 Feb 24 03:33 ..
-rwxrwxrwx 1 tommymsw tommymsw 2227 Feb 24 22:18 .bash_history
-rwxrwxrwx 1 tommymsw tommymsw 220 Feb 24 03:33 .bash_logout
-rwxrwxrwx 1 tommymsw tommymsw 3184 Feb 24 03:33 .bashrc
-rwxrwxrwx 1 tommymsw tommymsw 675 Feb 24 03:33 .profile
drwxrwxrwx 11 tommymsw tommymsw 4096 Feb 24 23:20 .sabnzbd
drwxrwxrwx 10 tommymsw tommymsw 4096 Feb 24 22:35 CouchPotato
drwxrwxrwx 12 tommymsw tommymsw 4096 Feb 24 03:53 SABnzbd
drwxrwxrwx 11 tommymsw tommymsw 4096 Feb 25 14:57 Sick-Beard
Offline
And feel free to opt-out on this. It's really not terribly important to me, I can manually start it and you guys helped me get it all running at least! I don't want to be a pain.
I have not tried to download anything yet, nor have I tried to sync my XBMC libraries because I am still transference data to the new drive. But if all works except for the auto start, I am a happy guy!
Offline
Try running the scripts now as your new user as you have created what needs be as root
Offline
danfozzy wrote:
Try running the scripts now as your new user as you have created what needs be as root
Not rally sure what you are asking here? What scripts?
You want me to follow the autostart guide only logged in as "newuser"? The guide says to log in as "root". And when I look at the code through "newuser" it is all still there.
Offline
When O log in as "user" and try to start Sabnzbd I get:
tommymsw@dlink-017349:~$ python Sick-Beard/SickBeard.py -d
sh: cannot create /dev/null: Permission denied
tommymsw@dlink-017349:~$ python CouchPotato/CouchPotato.py -d
tommymsw@dlink-017349:~$ python SABnzbd/SABnzbd.py -d -f .sabnzbd/sabnzbd.ini -s 192.168.1.10:8080
sh: cannot create /dev/null: Permission denied
Traceback (most recent call last):
File "SABnzbd/SABnzbd.py", line 1741, in <module>
main()
File "SABnzbd/SABnzbd.py", line 1036, in main
res, msg = config.read_config(inifile)
File "/home/tommymsw/SABnzbd/sabnzbd/decorators.py", line 31, in newFunction
return f(*args, **kw)
File "/home/tommymsw/SABnzbd/sabnzbd/config.py", line 650, in read_config
CFG = configobj.ConfigObj(path)
File "/home/tommymsw/SABnzbd/sabnzbd/utils/configobj.py", line 1242, in __init__
self._load(infile, configspec)
File "/home/tommymsw/SABnzbd/sabnzbd/utils/configobj.py", line 1249, in _load
h = open(infile, 'rb')
IOError: [Errno 13] Permission denied: '/home/tommymsw/.sabnzbd/sabnzbd.ini'
My Sickbeard also will not update.
2012-02-26 20:08:16.345524 CP Server Thread-4 :: Git returned bad info, are you sure this is a git installation?
And I can only start Sabnzbd and CP when I am logged in as "root". I don't get an error or anything while under "user" but the programs do not start.
Last edited by tommymsw (2012-02-27 06:01:01)
Offline
tommymsw wrote:
When O log in as "user" and try to start Sabnzbd I get:
tommymsw@dlink-017349:~$ python Sick-Beard/SickBeard.py -d
sh: cannot create /dev/null: Permission denied
tommymsw@dlink-017349:~$ python CouchPotato/CouchPotato.py -d
tommymsw@dlink-017349:~$ python SABnzbd/SABnzbd.py -d -f .sabnzbd/sabnzbd.ini -s 192.168.1.10:8080
sh: cannot create /dev/null: Permission denied
IOError: [Errno 13] Permission denied: '/home/tommymsw/.sabnzbd/sabnzbd.ini'
I just did a new install and was getting the same issue. SSH as root
#chmod 666 /dev/null && exit
SSH as newuser and try running SABnzbd
tommymsw wrote:
My Sickbeard also will not update.
2012-02-26 20:08:16.345524 CP Server Thread-4 :: Git returned bad info, are you sure this is a git installation?
Something is wrong with git clone. Better to delete and start a new. SSH as root
#cd /home/newuser/
#ls -a (make sure Sick-Beard is there)
#rm -rf Sick-Beard
#ls -a (confirm Sick-Beard is gone)
#exit
SSH as newuser
$cd /home/newuser/
$git clone git://github.com/midgetspy/Sick-Beard.git
Try running SickBeard
Please post results...
Offline
So....
chmod 666 and then started Sabnzbd as user and "success"! However, after NAS restart (to see if Sabnzbd would now auto start... it did not) when I run the script again, I am back to:
sh: cannot create /dev/null: Permission denied (so looks like the permissions didn't stick)
I uninstalled/reinstalled SB and ran it. Chose to update software but said it couldn't update "look in log file". Nothing was in the log file (tried a few times, same results) however, after restart of NAS, my SB now says "no update needed". So I guess it DID work? I guess? lol Although it really doesn't tell me what version I have... only alpha (master)
And still no luck with CP.
I still can only get it to start with "root" and then cd to the user folder.
CP updated fine. May be because it was started with "root"?
Seems like this all may be over permissions being messed up?
On a hunch I uninstalled/reinstalled CP as per your directions with SB (figuring that installing it as user may help. No luck, after reinstall, I still have to start it as "root".
Last edited by tommymsw (2012-02-27 20:28:29)
Offline
tommymsw wrote:
So....
chmod 666 and then started Sabnzbd as user and "success"! However, after NAS restart (to see if Sabnzbd would now auto start... it did not) when I run the script again, I am back to:
sh: cannot create /dev/null: Permission denied (so looks like the permissions didn't stick)
chmod 666 without restart
Before starting SABnzbd, SickBeard, and CouchPotato make sure that are all shutdown
Offline
Closed all programs
log in as "root"
chmod 666 /dev/null
log in as user and start:
Sabnzbd= success
SickBeard= success
CouchPotato= success
Restart NAS to check autostart:
Sabnzbd= fail
SickBeard= success
CouchPotato= fail
log in as user to start after NAS restart:
Sabnzbd= sh: cannot create /dev/null: Permission denied (but still started)
SickBeard= sh: cannot create /dev/null: Permission denied (but still started)
CouchPotato= paused and then brought up command-line (no error message - but did NOT start)
Last edited by tommymsw (2012-02-27 20:49:30)
Offline
Looks like the
"chmod 666 /dev/null"
solves my problems (maybe even the auto start problems) but when I restart the NAS, the permissions get un-set gain. I don't know why it would do that?
Offline
tommymsw wrote:
Looks like the
"chmod 666 /dev/null"
solves my problems (maybe even the auto start problems) but when I restart the NAS, the permissions get un-set gain. I don't know why it would do that?
I don't know why either but I believe I have a solution.
SSH as root
#nano /boot/linuxrc
#START SickBeard CouchPotato Headphone /etc/init.d/mediaservers.sh #START SABnzbd service sabnzbd start
--- Hit Control o to write file than Control x to exit file ---
Change it to look like the above
#nano /etc/init.d/mediaservers.sh
#!/bin/bash su root -c "chmod 666 /dev/null" su newuser -c "python /home/newuser/CouchPotato/CouchPotato.py -d" su newuser -c "python /home/newuser/Sick-Beard/SickBeard.py -d" su newuser -c "python headphones/Headphones.py -d"
--- Hit Control o to write file than Control x to exit file ---
#exit
Change it to look like the above
Restart your NAS. Let me know the results.
Last edited by Terrabyte (2012-02-27 23:40:46)
Offline
2 out or 3 aint bad!
SB and CP now both start on their own. (No sabnzbd though)
Restarted twice to make sure.
BTW... I didn't include references to headphones in the script.
Last edited by tommymsw (2012-02-27 23:49:05)
Offline
For reference?
tommymsw@dlink-017349:~$ ls -a
. .bash_history .bashrc .sabnzbd SABnzbd
.. .bash_logout .profile CouchPotato Sick-Beard
tommymsw@dlink-017349:~$
Offline
Post the content of the log file in the .sabnzb folder, it could be starting up then crashing straight away
Offline
2012-02-27 14:36:04,007::ERROR::[dirscanner:284] Cannot read Watched Folder /mnt/HD/HD_a2/Downloads/watched
2012-02-27 14:36:06,445::WARNING::[__init__:159] Signal 15 caught, saving and exiting...
That's your problem
Offline