The File Transfer Protocol (FTP) is used as one of the most
common means of copying files between servers over the Internet. Most web based
download sites use the built in FTP capabilities of most web browsers and
therefore server oriented operating systems usually include an FTP server
application as part of the software suite. Linux is no exception.
Here we will show you how to convert
your Linux Machine into an FTP server using the default Very Secure FTP Daemon (VSFTPD) package.
FTP Overview
FTP relies on a pair of TCP ports to
get the job done. It operates in two connection channels as I'll explain:
FTP Control Channel, TCP Port 21: All commands you send and the ftp server's responses to
those commands will go over the control connection, but any data sent back
(such as "ls" directory lists or actual file data in either
direction) will go over the data connection.
FTP Data Channel, TCP Port 20: This port is used for all subsequent data transfers between
the client and server.
In
addition to these channels, there are several varieties of FTP.
FTP frequently fails when the data has to pass through a firewall, because
firewalls are designed to limit data flows to predictable TCP ports and FTP
uses a wide range of unpredictable TCP ports. You have a choice of methods to
overcome this.