Search /
Docfinder:
Advanced search  |  Help  |  Site map
RESEARCH CENTERS
SITE RESOURCES
Click for Layer 8! No, really, click NOW!
Networking for Small Business
TODAY'S NEWS
The botnet world is booming
What’s driving this university to IPv6? Going green
How ending exclusivity agreements would change the telecom industry
How to use electrical outlets and cheap lasers to steal data
EMC distances rival NetApp
Crime lab saves energy costs by turning up heat in the data center
IBM security software masks confidential info
Google Native Client provides hints on Chrome OS gambit
Ericsson signs deal to run Sprint wireless, wireline networks
Verizon helping companies assess application vulnerabilities
Internet's biggest issue? IPv6 transition, new ARIN CEO says
Gmail, other Google apps, out of beta
Microsoft may have known about critical IE bug for months
Symantec de-duplication strategy targets data growth, virtual machines
Windows 7 ramp-up will be sharp
Applications /

FTP? Gearhead's here for you

Gearhead archive

A reader wrote: "Sure I know what FTP does from a user's point of view, but how does it actually do it?" That is a fine question.

FTP has a long and illustrious history. It first appeared as an Internet Engineering Task Force RFC 114 in 1971. Curiously, today RFC 114 doesn't appear to be anywhere on the 'Net!

But for all the current FTP request for comments that actually are on the 'Net, go to www.rfc-editor.org/cgi-bin/rfcsearch.pl and enter "FTP" as the search term. And the key RFC for FTP is RFC 959 written in 1985.

FTP is a protocol designed to let data be transferred from one computer to another. It is a client-server system and, depending on the client's rights, files may be sent to or retrieved from the server, directories created, listed or deleted and file attributes modified.

Advertisement:

The process required to transfer files involves three steps: 1. The client connects to the server and is authenticated (anonymous access may be allowed); 2. The client sends commands that may include listing and modifying directories as well as carrying out file transfers; and 3. The client disconnects (although disconnecting informally - that is, without telling the server you're about to disconnect - can be done safely).

To establish a connection, the client attempts to connect to TCP port 21 at the server's IP address. The client then authenticates through the user name command ("user <name>") and password command ("pass <pwd>"). Here's what an exchange between client and server looks like for anonymous access:

220 ftp.silcom.comready. Unauthorized access prohibited.
user anonymous
331 Guest login ok, send your complete e-mail address as password.
pass gearhead@gibbs.com
230 Guest login ok, access restrictions apply.

Note that many FTP servers will check to see if the given e-mail account (or sometimes just the domain) exists and will deny access if it doesn't.

As with most Internet protocols, a status code is added to text status message. This makes it possible for applications that might not understand the text reply to understand the responses.

For access through a named account, the process looks more-or-less the same:

220 ftp.somehost.com ready. Unauthorized access prohibited.
user gearhead
331 Password required for gearhead.
pass verysecret
230 User gearhead logged in.

So let's say we want to list the default directory on logon. We have to first set the format for data transfers to the client. This is done with the "type <type>" command. The argument <type> can be A for ASCII (used for test file transfers), E for EBCDIC (for all you old IBMers), or I for image (as in no translation). We can now use the "pwd" command to print the name of the working directory. Thus:

TYPE I
200 Type set to I.
pwd
257 "/" is current directory.

So we've been connected to the FTP server, we've been authenticated, and we know what directory we're in. Now it gets interesting, but you'll have to wait 'til next week as we've run out of space.

Transfer your thoughts to gearhead@gibbs.com.

RELATED LINKS

Comments and suggestions to gh@gibbs.com.

Gibbs Forum
The place to discuss Gibbs's columns.

Check out this week's edition of

Backspin for more musings from Gibbs.

Part 2: The connection to the server is made
Network World, 7/30/01.

Part 3: Connection modes
Network World, 8/6/01.

Part 4: Let the transfers begin
Network World, 8/13/01.

Part 5: FTP server security
Network World, 8/20/01.

Part 6: SITE and SYST
Network World, 8/27/01.


NWFusion offers more than 40 FREE technology-specific email newsletters in key network technology areas such as NSM, VPNs, Convergence, Security and more.
Click here to sign up!
New Event - WANs: Optimizing Your Network Now.
Hear from the experts about the innovations that are already starting to shake up the WAN world. Free Network World Technology Tour and Expo in Dallas, San Francisco, Washington DC, and New York.
Attend FREE
Your FREE Network World subscription will also include breaking news and information on wireless, storage, infrastructure, carriers and SPs, enterprise applications, videoconferencing, plus product reviews, technology insiders, management surveys and technology updates - GET IT NOW.
* HOME    * RESEARCH CENTERS     * NEWS     * EVENTS

Contact us | Terms of Service/Privacy | How to Advertise
Reprints and links | Partnerships | Subscribe to NW
About Network World, Inc.

Copyright, 1994-2006 Network World, Inc. All rights reserved.