File Transfer Protocol

FRAMINGHAM (04/18/2000) - File Transfer protocol (universally known as FTP) is a remarkable term: It's both noun and verb, protocol and application, client and server (daemon).

FTP, developed in 1969 by the U.S. Department of Defense's Defense Advanced Research Projects Agency, is a standard for moving files across IP-based networks such as the Internet. Based on the TCP/IP protocol, FTP is platform-independent, which makes it possible for different computers running different operating systems to exchange files.

Text files are, by default, sent in ASCII format. The client, or sending computer, converts the data into 8-bit ASCII format. The server, or receiving computer, converts the ASCII text into a format appropriate to its hardware and operating system. Images and other nontext data such as compiled programs are sent as binary data, using 8-bit bytes.

Typically, FTP files are compressed. They can be self-extracting, or you may need to use a program such as PKZIP to uncompress them.

A user contacts a server via the FTP client, establishes a connection, logs on to the network, requests directory listings and copies files. This can be done by typing commands or via an FTP utility running under a graphical user interface such as Windows.

Rules of Engagement

One variation of FTP is Trivial FTP, which has no directory or password capabilities. However, the most popular form is Anonymous FTP, which is dependent on the server configuration. When the FTP server is contacted, it asks for a user name and password. Users log in as "anonymous" and can access files on the server. By convention, users input their e-mail address as the password.

Typically, users can download files but are unable to upload, change or delete them. If some users must be given those rights, the usual procedure is to set up a separate upload directory to maintain the security of the download section.

For example, if your Web site is hosted by an Internet service provider, you might FTP Web site updates to such a directory. The Internet service provider would retrieve the updates from that directory.

Without a firewall that provides authentication and privacy via virtual private networks, password-protected FTP is useful only for files of minor importance.

Between client and server, FTP passes user names and passwords in clear text, which can easily be stolen.

As an application, FTP is typically built into communications software, which supports other common file transfer protocols, such as Xmodem, Ymodem, Zmodem and Kermit.

Xmodem, which transmits 128-byte blocks, was the first FTP for PCs. It performs a checksum on packets to help ensure accurate transmission. The sending computer uses an algorithm that calculates the binary values in a packet and sends the result as a tail on the packet. The receiving computer goes through the same algorithm. If the two sums match, then it's fine; if not, it requests that the packet be re-sent.

Both are stop-and-wait protocols. The sending computer transmits, waits to receive an acknowledgment, or ACK, from the receiving computer that the packet was received intact. A negative acknowledgement, or NAK, indicates a bad or missing packet and requests that the sending computer re-send the packet.

Zmodem is a streaming protocol. The sending computer keeps sending packets until it gets a NAK. Then it backs up to the bad packet and resends from there.

Zmodem also adjusts packet size, depending on line conditions. If transmission is interrupted midtransfer, Zmodem can restart and resume sending from the point at which it was interrupted. It's often used for satellite transmissions because of its ability to handle changeable line conditions.

Kermit was developed in 1981 at Columbia University. When it breaks a file into packets, each packet is bracketed by control data. The receiving computer checks each packet's control data as it arrives and sends an ACK or NAK, as applicable, to the sending computer.

The default communications protocol for the Web, Hypertext Transfer Protocol (HTTP), is used to transmit HTML pages from Web server to client browser. HTTP Secure offers a security option that FTP doesn't. And an HTML-coded page allows for greater complexity and flexibility in layout than does straight ASCII text.

However, even with caching and persistent connections, HTTP adds overhead to a Web download.

Sometimes, Old Ways Are Best

More than 30 years after it was developed, FTP is still the most efficient way to download large files over the Internet.

Want a map that shows the habitat of every vertebrate and plant, as well as the latitude, longitude, elevation, rainfall, temperature range and climate of the Grand Canyon? The U.S. Geological Survey (USGS) in Tucson, Arizona, uses a single Unix box to provide the data sets that create such multilayer maps and then FTPs the final map to the requesting computer.

Why does the USGS use FTP? There are several reasons:

-- It's small. FTP was designed to send and receive files without encoding and decoding the data. To attach and send a graphics or map file using an e-mail program, it must be encoded. If a mail gateway at the receiving end limits the total length of an e-mail message, it will break up the file and send the pieces, which must be manually recombined.

-- It's fast. Because you send FTP directly, it doesn't need the extra processing "weight" of the messaging applications needed when you send a file by attaching it to an e-mail message.

-- It's simple. All you need is a PC with modem and Web browser, plus a phone line. Initiate the FTP transfer from within your browser. It's as easy as typing ftp:// and then the Web address.

-- It's reliable. Got "noisy" phone lines? It doesn't matter. When the computer on the receiving end of an FTP transfer reassembles the file, guided by each packet's number, it checks for lost packets. If any are missing, it signals the sender to resend them.

DEFINITION

File transfer protocol is a standardized method for sending unencoded binary files over IP connections. FTPing a file is more reliable than other methods, such as sending it as an attachment to an e-mail. The sending computer breaks the file data into numbered packets. The receiving computer uses the numbers to reassemble the packets in the right order.

Copyright 2018 IDG Communications. ABN 14 001 592 650. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of IDG Communications is prohibited.