Installing ProFTPD
From: M.W.Chang
Date: 18 March, 2002
This document describes the compile/install and configuration of a very basic ProFTPD service.
Grab the proftpd-1.2.4.tar.gz from Proftpd website. I am using Caldera OpenLinux 3.1, so I configured the package with these switches, and use checkinstall-1.5.1 to turn the package into an regular RPM for installation:
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/run
make -j 3
checkinstall -si make install
mkdir /home/ftp; chmod 753 /home/ftp; chown ftp:ftp /home/ftp
mkdir /home/ftpdown;chmod 555 /home/ftpdown; chown nobody:nobody /home/ftpdown
NOTE: checkinstall-1.5.1 would require you to enter the path to Caldera's RPM repository in /usr/src/OpenLinux.
Then I wrote the /etc/proftpd.conf by reading the /usr/src/proftpd-1.2.4/doc directory. My proftpd exhibits the following characteristics:
- It will be a standalone daemon, started by /usr/sbin/proftpd. If you want to use inetd, make sure you edit /etc/inet.d/ftp, and use in.proftpd as daemon name.
- Unlimited number of users can always upload (which you may not want that)
- 3 users can download at any time, with bandwidth locked at 20000 kb/s.
- All uploads go to /home/ftp, and on one can download from it.
- Users can download from /home/ftpdown only.
- No users can login their home directory (well, I would study about it later)
- Newly uploaded files are owned by ftp:ftp and cannot be downloaded by anyone. To allow files to be downloaded, chown nobody:nobody the_file and move them to /home/ftpdown.
- The anonymous account is linked to a real user account ftp in /etc/passwd, with shell set to /bin/false.
- To upload, users punch in ftp://111.222.333.444
- To download, users punch in ftp:[EMAIL PROTECTED]
Proftpd generates a log file that's similar to the log file wu-ftpd. That means, you can use the xferstats script from wu-ftpd to analyze the log. I put the xferstats script in /usr/sbin. There is a newer version of xferstats. Search for it via google.com using keyword "xferstats" or try http://xferstats.off.net
To know the transfer rates, you may use SNMP tools like MRTG. One linux-sxs editor recommneded console tools pppstatus and ethstatus. You can find them in freshmeat.net!
Note that xferstats script cannot handle non-ASCII file names (for me, that means chinese) properly and would give you a divide-by-zero error. When I saw that, I would delete the log entries. Hope someone could teach me how to fix the xferstats script.