OS: Linux(Debian) User: root

note, remove nzb user and replicate process for ntfs share for sabnzbd user

Useful links: https://gist.github.com/joshenders/4181257 http://www.nasdestruction.com/tutorial-installing-debian-squeeze-sabnzbd-sickbeard-couchpotato-headphones-d-link-dns-320-dns-325/

Install Git:

apt-get install git-core

Create user for Sab and make symbolic link from source to sabnzbd home:

useradd --system --shell /bin/false --no-create-home --home /home/sabnzbd sabnzbd
ln --symbolic /usr/src/sabnzbd /home/sabnzbd

Download Sabnzbd Source:

cd /usr/src/
git clone git://github.com/sabnzbd/sabnzbd.git
chown --recursive sabnzbd:sabnzbd sabnzbd

Install Dependencies:

apt-get install python python-cheetah python-configobj python-feedparser python-dbus python-openssl python-support python-yenc par2 zip unzip

Install Special version of Unrar(non-free):

pico /etc/apt/sources.list

Add to top: "http://http.us.debian.org/debian wheezy main contrib non-free" then:

apt-get update
apt-cache search unrar
Note: unrar - Unarchiver for .rar files (non-free version)
apt-get install unrar

Download Config files for initializing Sabnzbd(sabnzbdplus.default and sabnzbdplus.ini) - Note: designed for "sabnzbd" user:

cd /usr/src
git clone git://gist/github.com/4181257.git

Install init scripts(just downloaded):

cd /usr/src
cp sabnzbdplus.init /etc/init.d/sabnzbdplus
cp sabnzbdplus.default /etc/default/sabnzbdplus
chmod +x /etc/init.d/sabnzbdplus

Take Ownership of sabnzbd directory(as sabnzbd user):

cd /usr/src
chown -R sabnzbd:sabnzbd sabnzbd/

Edit Hostname and port for SABNZBD at startup:

pico /etc/default/sabnzbdplus

Change: Hostname:0.0.0.0 Port:8080

Start Sabnzbd:

/etc/init.d/sabnzbdplus start

Navigate to: ipaddress-running-sab:8080

Add Sab to default runlevel:

update-rc.d sabnzbdplus defaults

Normal Response - update-rc.d: using dependency based boot sequencing

Install Sickbeard, Couchpotato, Headphones, and Transmission

git clone git://github.com/midgetspy/Sick-Beard.git

To install CouchPotato run the following command:

git clone https://github.com/RuudBurger/CouchPotatoServer.git

To install Headphones run the following command:

git clone git://github.com/rembo10/headphones.git

Allow each of these applications to right to their own directory as sabnzbd user:

chown --recursive sabnzbd:sabnzbd CouchPotatoServer
chown --recursive sabnzbd:sabnzbd headphones
chown --recursive sabnzbd:sabnzbd Sick-Beard

Create symbolic links to home directory:

ln --symbolic /usr/src/CouchPotatoServer /home/CouchPotatoServer
ln --symbolic /usr/src/headphones /home/headphones
ln --symbolic /usr/src/Sick-Beard /home/Sick-Beard

Once those are installed you can start each service by running the following commands :

python Sick-Beard/SickBeard.py -d
python CouchPotatoServer/CouchPotato.py --daemon
python headphones/Headphones.py -d

You can access each service once started by typing the IP address of your NAS into your web browser and using the following ports for each service:

SickBeard on port 8081 ( yourNASIPHere:8081 ) CouchPotato on port 5050( yourNASIPHere:5050 ) Headphones on port 8181 ( yourNASIPHere:8181 )

Re-Own after first run as as it was originally run as root and created additional files:

chown --recursive sabnzbd:sabnzbd CouchPotato
chown --recursive sabnzbd:sabnzbd headphones
chown --recursive sabnzbd:sabnzbd Sick-Beard

Config Sickbeard to start on Startup:

cd /usr/src/Sick-Beard
cp init.ubuntu /etc/init.d/sickbeard
chmod +x /etc/init.d/sickbeard

Configure Defaults file all for Sickbeard

nano /etc/default/sickbeard
SB_USER=sabnzbd
SB_HOME=/usr/src/Sick-Beard
SB_DATA=/usr/src/Sick-Beard
SB_OPTS="--config=/usr/src/Sick-Beard/config.ini"
update-rc.d sickbeard defaults

Configure Defaults file all for CouchPotato:

cd /usr/src/CouchPotatoServer
cp ubuntu /etc/init.d/couchpotato
cp ubuntu.default /etc/default/couchpotato
chmod +x /etc/init.d/couchpotato

nano /etc/default/couchpotato

# COPY THIS FILE TO /etc/default/couchpotato
# OPTIONS: CP_HOME, CP_USER, CP_DATA, CP_PIDFILE, PYTHON_BIN, CP_OPTS, SSD_OPTS

CP_HOME=/usr/src/CouchPotatoServer
CP_USER=sabnzbd
CP_DATA=/usr/src/CouchPotatoServer
SB_OPTS="--config=/usr/src/Sick-Beard/config.ini"
SB_PID=/var/run/potato/couchpotato.pid
update-rc.d couchpotato defaults

Configure Startup settings for headphones:

cd /usr/src/headphones/init-scripts
cp init.ubuntu /etc/init.d/headphones
chmod +x /etc/init.d/headphones
nano /etc/default/headphones
HP_USER=sabnzbd
HP_HOME=/usr/src/headphones
HP_DATA=/usr/src/headphones
update-rc.d headphones defaults

Configure URL Bases for Proxy(apps must be shut off when editing config files): At the top of /etc/apache2/sites-enabled/"mainsite" make sure to add ProxyPreserverHost On Sickbeard - in config - /sickbeard CouchPotato - in web - /potato Headphones - in config must be off - /headphones Sabnzbd - auto

Configure Auto-Mount in Virtualbox for sabnzbd user:

adduser sabnzbd vboxsf

Updating Sabnzbd:

cd /usr/src/sabnzbd
sudo -u sabnzbd git pull

Installing Sonarr:

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FDA5DFFC

echo "deb http://apt.sonarr.tv/ master main" | sudo tee /etc/apt/sources.list.d/sonarr.list

apt-get update

apt-get install nzbdrone

To Start: mono /opt/NzbDrone/NzbDrone.exe

Default Port/Site: http://localhost:8989

OS: Linux(Debian) User: root

UNIX/Linux has no per-user permissions/rights/policies. Everything is done on files, making sure who can read/write/exectute the right files. To check the current permissions of files, run "ls -l". If you run "ls -l /", to list all files in the root directory, you will get output that looks something like this:

drwxr-xr-x    2 root     root         4096 2003-07-15 22:41 bin
drwxr-xr-x    4 root     root         1024 2003-07-16 03:26 boot
drwxr-xr-x   20 root     root       118784 2003-07-16 03:32 dev

The first column (that looks like drwxr-xr-x) is the mode of the file. The first character indicates what kind of file it is. d, as in this case, means directory. - means regular file, and then there are some other file types of which you need not know more now, like named FIFOs, sockets, devices, etc. The rwxr-xr-x is the permissions of file. The first rwx means that the owner of the file can read, write and execute the file. For directories, the right to execute it means the right to use it. Just being able to read a directory means that you can read what files are in the directory, but you won't be able to use them without the execute permission on the directory. The first r-x means that those that are in the same group as the file have read and execute permissions to the file.

The second r-x means that all those that are neither the owner of the file nor are in the same group as the file have read and execute permissions on it. So r=read, w=write and x=execute, and the first group of three applies to the owner of the file, the second group applies to those in the same group of the file, and the third group applies to all other users. The second column (2, 4 and 20 in this case) is the number of links that the file has. Don't care about that for now. The third column is the owner of the file, in this case root. The fourth column is the group of the file, in this case the root group.

The fifth column is the size of the file. The sixth is the time the file was last modified The seventh is naturally the name of the file.

Picture Summary:

linuxfilepermissions

chmod /change the permissions of a file/

chown /change the owner of the file/

chgrp /change the group that the file belongs to/

example: chmod 777 somefile.file /*

This gives exe write and read to all */ not recommended for any file.

for chmod here is a list of the numbers and what they meen

the 100's are for the owner of the file 400 read 200 write 100 execute

10's are for the group of the file 40 read 20 write 10 execute

1's are for everyone else 4 read 2 write 1 execute

you add the number together to get different permmisions

Example: How to change owner and owner group of a file

chown -R sabnzbd:sabnzbd sabnzbd/
  • -R: Recursive, own directory and all contents

How to add a user to a group:

usermod -a -G <groupname> username

Change user's primary group:

usermod -g <groupname> username

What group user is assigned to:

id <username>

View all groups:

groups or users

Add new user and assign group:

useradd -g <groupname> username

Add single user to multiple groups:

usermod -a -G ftp,admins,othergroup <username>

Assign user a password:

passwd jsmith

Add a group:

groupadd <groupname>

This is a test.