FTP (File Transfer Protocol) is one of the oldest protocol that still exist and widely used on the Internet to transfer files to and from other places. Many application are still distributed using FTP, including Linux kernel. Providing a secure and stable FTP service is very easy, as you only have to install the FTP Server package and it will serve you. This article will help you to install and configure one of the FTP Server available, which called VSFTPD (Very Secure FTP Daemon) which was developed by Chris Evans. I'm using Slackware for this article, but it will be applicable to other distro as well (you only need to look for the correct path, since it may differ). You may get this package from their official site.
Since this package has been included in Slackware distribution, i only need to locate their presence and install it by executing:
installpkg vsftpd-2.0.5-i486-1.tgz
At this time, VSFTPD is already installed and it's waiting to be configured by you. For your information, VSFTPD is considered as one of the most secure FTP Server available thus it will have tight security setting out of the box, so you might want to configure it correctly before you start the service. Before that, we should know how this application work. VSFTPD has two mode of which it can run. The first mode is a standalone. Using this mode means you will have more control on VSFTPD process, but as the tradeoff, you will have to start/stop VSFTPD manually (you can also make a script to manage that, though). If you want to use this mode, then you will have to edit the VSFTPD configuration file and remove the "#" mark on the last line (#listen=YES). That's it. You can start the service right away after you call the VSFTPD binary file (/usr/sbin/vsftpd &).
The second mode is by including it in inetd service. By using this mode, we don't have to modify the configuration file, but we have to modify inetd configuration file, which is located in /etc/inetd.conf (in Slackware) and (again) remove "#" mark in this line.
ftp stream tcp nowait root /usr/sbin/tcpd vsftpd
After you do that, you can restart the inetd service by executing
/etc/rc.d/rc.inetd restart
or
kill -SIGHUP `<PID inetd>`
By default, VSFTPD doesn't allow anybody to login and do nothing, so you might have to change some setting before you can get yourself a secure FTP Server. Please consult with the EXAMPLE given and also read the heavily commented configuration file as most of it are self-explanatory.
Providing a FTP Server is not that hard. Everything is ready to be deployed and we only had to configure it correctly.
Last Update : 14 April 2007 :: 08:55:05
Comments