Om goed met Unslung op de Linksys NSLU2 te kunnen werken, is het handig om diverse tools te installeren.

Om geheugengebruik te checken:

$ ipkg install atop

Gebruikers/rechten en de data

Om gebruikers aan te maken gebruik je geen adduser commando, maar je maakt deze aan met de webinterface (Administration->Users)

Het hierbij gebruikte users id is 2000 en hoger. Het group id voor everyone is 501. De webinterface filtert ook op deze id’s, ze kunnen dus niet aangepast worden om ze gelijk te maken met de andere servers. Maar dit is geen probleem, maak alleen de users aan om via de web interface in te loggen.

De data van de everyone group staat in: /share/hdd/data/public/

Dus als we met het rsync commando naar deze directory syncen, en de user/group id’s niet gelijk maken aan de web-interface users, dan kunnen we nog steeds bij alle data via de web-interface.

$ cd /share/hdd/data/public  
$ rsync -av rsync://192.168.1.240/nas/ ./

FTP

Om de NSLU2 via ftp te bereiken doe het volgende:

$ ipkg install vsftpd

Detail informatie zie www.nslu2-linux.org/wiki/Optware/Vsftpd

Create the empty jail directory as root with mkdir -p /usr/share/empty

Ensure vsftpd.conf is in /opt/etc (the default vsftpd.conf is below)

If you use the default vsftpd.conf make sure that /opt/var/log exists and is writable by vsftpd

Create (or modify existing) diversion script /unslung/rc.xinetd . Previous suggestions were broken in that multiple lines could be added or other services, like telnetd, become disabled. A good solution (not just for vsftpd, but for all applications needing entries in inetd.conf) seem to be:

$!/bin/sh  
$ vi /unslung/rc.xinetd
if [ ! -f /etc/inetd.conf ] || !(grep vsftpd /etc/inetd.conf -q) ; then  
    echo "ftp stream tcp nowait root /opt/sbin/vsftpd /opt/etc/vsftpd.conf" >>/etc/inetd.conf  
fi
return 1

Note: Make sure that the file /unslung/rc.xinetd file ends with the line “return 1” in order for inetd to be started when /etc/rc.d/rc.xinetd is executed

Restart xinetd with /etc/rc.d/rc.xinetd

Assure yourself that you use a linux compatible texteditor otherwise the CR/LFs will be wrong and your ftp-server will not start!!

Test it out with your favorite ftp client, and enjoy.

Tip: Make sure the file /unslung/rc.xinetd is executable.

Using “chmod 755 /unslung/rc.xinetd”.

Let op: in vsftpd.conf moet het volgende ook in staan, anders krijg je een 500-Oops:

listen=NO
echo "ftp stream tcp nowait root /opt/sbin/vsftpd /opt/etc/vsftpd.conf" >>/etc/inetd.conf

to your /unslung/rc.xinetd file