Topics covered in this tutorial:
- Overview of FTP
- Business-Related Ideas and Uses
- Overview of FTP Process
- FTP Clients
- Configuring an FTP Server
- FTP Security
- Searching for a File
Overview of FTP
FTP is an extremely useful facility which operates either on the Internet or on any TCP/IP network. It provides the ability to transfer electronic files from one host to another in either direction. It may be used to obtain copies of applications, manuals, academic and discussion papers or data files.
FTP is a stable protocol which has not continued to evolve like HTTP. It uses the TCP protocol for the reliable transfer of files. The protocol allows the transfer of any file format, and provides a more efficient alternative to using HTTP or attachments in e-mail.
A similar protocol TFTP (Trivial File Transfer Protocol) provides connectionless file transfer over UDP. This is only suitable for very small files; for example, uploading configuration files to routers.
File Transfer Protocol (FTP)
FTP was one of the earliest protocols used on the Internet. It was originally a text-orientated interface, using a series of Unix commands to control the process. Nowadays GUI interfaces have been developed to make the process simpler.
It is especially useful for transferring files between computers using different operating systems or file systems. For example, transferring a file from a UNIX host to a host running Microsoft Windows 98.
Business-Related Ideas and Uses
The World Wide Web (WWW) has replaced many of the functions of FTP. However, until recently, the web was limited to downloading files. Only FTP allows you to upload; that is, to copy files from a client computer up to a server. If your remote users need to do this, they must use FTP.
Also, if you have existing files that you want to make available to remote users, FTP is an extremely easy service to install and maintain. After installation, the FTP service is simply pointed to the location of the files; no additional configuration is necessary. Files made available through FTP can be in any format, such as document files, multimedia files, or application files.
Using FTP allows access to information more quickly than sending disks and hardcopy materials through regular, or even express, mail. Typical applications for FTP include:
- distribution of software, patches / updates or drivers
- providing copies of manuals or documentation for products. A variety of formats are used, including MS Word (DOC), Adobe Acrobat (PDF), Hypertext Markup Language (HTM / HTML) and PostScript (PS)
- major advantage is the ability of FTP clients to upload (as well as download) files to the FTP server, allowing mobile or remote members of staff to work on documents held centrally
- FTP is often used by web server administrators to manage the files which comprise their web sites remotely
Compression utilities may be used to reduce the size of files which are transferred and reduce the time taken.
Overview of the FTP Process
FTP is a client/server application for transferring files from one host to another. The FTP standard is defined in RFC 959 (October 1985) which superseded RFC765. The standard has been subsequently updated in RFC2228 and RFC2640. RFCs can be downloaded from www.internic.net.
The RFCs describe the communication channels established between client and server, and the commands/ responses that the client can send and expect to receive.
Two different types of communication channel are used by the FTP process:
- Control - used for commands and server responses on TCP port 21
- Data - established for the transfer of files on TCP port 20
The File Transfer process consists of the following stages:
- Establish session
- Authenticate
- Perform transfer
- Quit session
Commencing a typical FTP session:
C:\\>FTP 100.100.100.100
Connected to ftp.isp.net
220 ftp.isp.net FTP server (RedHat Linux 6.0) ready
USER: user1
331 User1 login OK, send password
PASSWORD: user1@isp.net
230 User1 login OK, access restrictions apply
Using binary mode to transfer files
ftp>