NSLU2-Linux
view · edit · print · history

Introduction

The File Transfer Protocol (FTP) is a very basic file service, and it's natural that an NSLU2 should support it. There are many different modules which can provide FTP services on your NSLU2. The standard Linksys software includes a FTP module known as bftpd. As you add modules to your NSLU2, you will probably want to stop using this and use some other FTP service.

FTP options

The Optware packages include many which support FTP.

  • VSftpd, or "Very Secure FTP" is secure, fast, and consumes few resources.
  • ProFTPd has very rich capabilities.
  • ncFTP - A user friendly FTP client with background spooling.
  • tftp-hpa - A simple tftp package
  • The inetutils module had an FTPd?, but inetutils is being phased out of Unslung.

See each of these module descriptions for how to install and configure them.

How to turn off the built-in bftpd FTP server

No matter which FTP option you choose, it will take the place of the bftpd (or bsftpd) built into the Linksys software. So, you should disable bftpd.

This is most easily done by going to the NSL2? web interface. Under Administration / System, uncheck the box next to "Enable FTP Server". Then press the "Save" button.

You can also check the file /etc/inetd.conf, which controls which services the the internet monitoring process inetd invokes. Delete any line beginning with "ftp" and containing "bftpd" to turn off bftpd. If you installed another FTP module, you may see other lines beginning with "ftp" in this file. There must be only one such line.

Troubleshooting

  • Problem: running /etc/rc.d/rc.xinetd gives an error message, "Unable to bind socket: : Address already in use. Unable to listen to socket". Solution: Look for configuration commands which prepare multiple FTP services. For example, be sure that /etc/inetd.conf contains only one line starting with "ftp".
  • Note that ipkg install lsof, "lsof | grep LISTEN" is of help as fuser is only available for slugos with newer libraries.)
  • Problem: No "ftpd" process running Solution: Actually, this is correct behaviour. There will be an inetd or xinetd process running. The FTPd? process doesn't get started until an FTP client attempts to contact the server with an FTP request.

Historical notes

How to set up an inetutils FTP server

Notice: The inetutils ftpd is now phased out of Unslung.

Please disable the builtin bftpd server, and use Optware packages proftpd or vsftpd instead.

(In standard circumstances: disable the builtin bsftpd / bftpd server first, easiest via the web frontend under Administration / System. /etc/inetd.conf should only have one line for ftp. Else, /etc/rc.d/rc.xinetd gives you "Unable to bind socket: address already in use. unable to listen to socket"! Note that ipkg install lsof, "lsof | grep LISTEN" is of help as fuser is only available for slugos with newer libraries.)

The rest of this page is present for historic reasons:


Here are the instructions for setting up an FTP server on your Unslung NSLU2.

  1. Get a running Unslung NSLU2 that you can log into.
  2. Telnet/SSH to the box
  3. ipkg install inetutils
  4. cp /opt/libexec/armv5b-softfloat-linux-ftpd /bin/ftpd
  5. chmod 777 /bin/ftpd
  6. /bin/ftpd -D

Note: There may be a few inconsistencies relating to the above steps.

With my Unslung NSLU2 I had to modify the following:

3. ipkg install inetutils

4. cp /opt/libexec/ftpd /bin/ftpd

Before performing any of the steps, it may be necessary to first telnet into the box and type "ipkg update" in order to update the package repository.

At this point you have a running ftpd server. If you FTP to your box, you will have full access to the entire NSLU2. Your external hard drive will be /share/hdd/data/public

Anonymous users will only have read only access. They may browse but not upload or download. (If you follow the chmod 777 directions below, anonymous users will be able to do more. Only give out the security you want them to have!)

Users configured on your NSLU2 will be able to browse and upload/download to any directory they have been given access to.

This server will NOT be run automatically, if you reset your NSLU2 you must restart the FTP daemon by running /bin/ftpd -D

This method of running ftpd (ftpd -D) will run its own inet daemon, even through one is already running on the box.


Files that you upload do not have the correct permissions. This means they are not browsable via Samba on your Windows box. to fix these :

  1. chown -R admin.everyone /share/hdd/data/public
  2. chmod -R 777 /share/hdd/data/public

Installing ftpd on Unslung 3.18-beta

A German tutorial can be found at http://www.ruhrpottserver.de/index.php/FTP-Server_einrichten

view · edit · print · history · Last edited by Jim DeLaHunt.
Based on work by Jim DeLaHunt, nathankirkhamrocketmailcom, case, tman, bobtm, barrym, fossy, BattleTank, Troglodyte, and jrcoyne.
Originally by jrcoyne.
Page last modified on December 29, 2009, at 07:14 AM