This article is based on NAS4Free 9.1 and SABnzbd+ 0.7.4. It describes how to make a NAS server which can download from newsgroups for multiple users. Each user gets his own folders, download queue and history.
Install the full version of NAS4Free. The embedded version doesn’t let you install packages. They are in the same download, you choose one while installing.
Create a share ‘myshare’, point it at /mnt/mydisk.
Creating users and groups
Create a group ‘users’: Access > Groups > add
Create a user ‘usera’ and a user ‘userb’, primary group ‘users’, Home directory /mnt/mydisk/usera and /mnt/mydisk/userb.
Create a user ‘admin’, primary group ‘wheel’ and set Shell to bash.
Enable SSH: Services > SSH
Download and start PuTTY (Google knows where to find it).
In PuTTY: Host Name (or IP address): your NAS4Free machine’s ip, port 22, Connection type SSH. Click the Open button.
login as: admin
type the root password (the one you use to enter the web interface)
Installing packages necessary for SABnzbd+
#pkg_add -r py27-cheetah #pkg_add -r py27-openssl #pkg_add -r py27-yenc #pkg_add -r py27-sqlite3 #pkg_add -r unrar #pkg_add -r unzip #pkg_add -r par2cmdline
At the moment of writing SABnzbd+ is not a package for FreeBSD 9.1 (on which NAS4Free 9.1 is based) so we need to install it manually:
#cd /mnt #Next two lines are one command #fetch http://sourceforge.net/projects/sabnzbdplus/files/ sabnzbdplus/0.7.4/SABnzbd-0.7.4-src.tar.gz
(Replace sab’s version number by the current number.)
#tar -xvf SABnzbd-0.7.4-src.tar.gz
#mv SABnzbd-0.7.4 SABnzbd
Delete downloaded file:
Configure SABnzbd+ for each user
For each user do this: (replace ‘usera’ by the current username and use unique port numbers, e.g. 8081, 8082, 8083 etc.)
In NAS4Free’s web interface go to System > Advanced > Command Scripts, add this command (on one line):
/usr/local/bin/python /mnt/SABnzbd/SABnzbd.py -d -f /mnt/mydisk/usera/lurk/sabnzbd.ini -s 0.0.0.0:8081
After entering the command for each user, restart NAS4Free. You could instead run all commands from the command line but by rebooting you verify it actually works on boot.
Make sure you don’t exceed the number of download slots your news provider allows.
Per user log on to SAB’s web interface and set:
Permissions for completed downloads: 777
watched folder for nzb (change it if you don’t like the current setting)
Fix filesystem rights via SSH
For each user (replace ‘usera’ by the current username):
#chown usera usera
(chown [folder] )
#chmod -R go= usera