Roadmap96: MAP13 - FTP (Part One)
|RM 01 02 03 04 05 06 07 08 09 10
11 12 13 14 15 16 17 -B 18 19 20
21 22 23 24 25 XT XT 26 XT 27
MAP13: FTP (PART ONE)
"The desire of knowledge, like the thirst of
riches, increases ever with the acquisition of it."
-- Laurence Sterne, Tristram Shandy
Last week we used a tool called "Telnet" that allowed us to access remote computers and run programs on those remote computers. This week we are going to use a tool called "File Transfer Protocol" (or "FTP") that will allow us to access remote computers and retrieve files from these computers. Actually, it is probably more accurate to say that we will be using "anonymous" FTP, but I will explain that in a minute.
What sort of files are available through FTP? Well, according to the Electronic Frontier Foundation's "EFF's Guide to the Internet":
Hundreds of systems connected to the Internet have file libraries, or archives, accessible to the public. Much of this consists of free or low-cost [computer] programs for virtually every make of computer. If you want a different communications program for your IBM, or feel like playing a new game on your Amiga, you'll [probably] be able to get it [using FTP].
But there are also libraries of documents as well. If you want a copy of a recent US Supreme Court decision, you can [get a copy using FTP]. Copies of historical documents, from the Magna Carta to the Declaration of Independence are also yours for the asking ... You can also find song lyrics, poems, [and] even summaries of every [Animaniacs] episode ever made. You can also find extensive files detailing everything you could ... possibly want to know about the Net itself. (1)
Before we get too far into FTP, I think that now is as good a time as any to quickly review the client/server relationship that we briefly talked about in lesson three (MAP03: Levels of Internet Connectivity).
A "Client" is a program running on your Internet Service Provider's system (or on your own computer if you have a SLIP or PPP connection) that enables you to talk to, and get stuff from, distant computers. The client takes your commands and turns them into requests for information from other, bigger programs -- "servers" -- running on remote computers. The client/server relationship allows you to TELNET into remote servers and run programs on those remote servers, and it also allows you to use FTP to get files from remote servers.
The client/server relationship is also what makes my job as an Internet trainer quite difficult. While all of the FTP clients out there do exactly the same things, they all use different commands to do it. Fortunately, if you can understand the basics of what happens during an FTP session, the commands, no matter what client you are using, are pretty easy.
The basic steps in an FTP session are:
- Start up your FTP client;
- Give your FTP client an address to connect to (and, just as with TELNET, step one and two can usually be combined into one easy step);
- Identify yourself to the remote site;
- Give the remote site a password;
- Look around the directory for files;
- Change Directories;
- Set the transfer mode (optional);
- Get the file(s) you want; and
The best way to understand how FTP actually works is to look at a sample FTP session. Since the folks at the Internet Network Information Center (InterNIC) were kind enough to give this workshop a home, we are going to FTP to them.
Before I do that, though, there are three things that I need to emphasize:
- FTP requires a heck of a lot of resources, both on your system
and on the remote system that you are accessing. Because of this,
FTP sessions should only be run during non-working hours (usually
from 6 PM to 6 AM local time).
I realize that this constraint is going to be difficult for those of you who are reading this at work and who only have Internet and FTP access through your employer. However, as responsible Internet citizens, we have to remember that the FTP sites are providing us FTP access out of kindness. If we abuse this kindness and access various FTP sites during working hours, those FTP sites may decide to close their doors to the public ... and then EVERYONE loses.
- In light of what was said in #1, please do not flood the InterNIC. Later this week we'll return to Yanoff's list to find a whole bunch of FTP sites that we can visit. Until that time, however, just sit back and enjoy the show. :)
- Because this lesson is already over 100 lines long, I hope that you will not mind if I break this FTP lesson into two parts. This is the first part of the lesson and MAP14: FTP (PART TWO) will contain the second part of the lesson. This means that we will end this lesson in the middle of our sample FTP session, but it also means that this lesson will not be the size of a small book. :)
Starting an FTP session is pretty easy. For most of you, all you have to do to start up your FTP client is type
on your system's command line (or, if you are in a Windows or Mac environment, double-click on the FTP icon). From there, you'll need to give your FTP client an FTP address with which to connect.
As with TELNET, however, there is usually a way to combine these two steps into one easy step. For most of you, to access your FTP client and give your client an address to hook up to, all you would have to do is type the command
ftp <site address>
and replace <site address> with the address of the FTP site that you want your client software to access.
In our example, the InterNIC's FTP address is "rs.internic.net", so I type
Once I press the ENTER or RETURN key, the following appears on my screen:
Connecting to RS.INTERNIC.NET 188.8.131.52, port 21 220-*****Welcome to the InterNIC Registration Host ***** *****Login with username "anonymous" *****You may change directories to the following: policy - Registration Policies templates - Registration Templates netinfo - NIC Information Files domain - Root Domain Zone Files 220 And more! USER (identify yourself to the host):
The first line tells me that my system is connecting to "rs.internic.net" (and even gives me the IP number for "rs.internic.net"), the next couple of lines are some automatic information from the InterNIC, and the bottom line asks me to login.
Sometimes, however, you may connect to an FTP site and not see a line asking you to login. If that ever happens, just type the command
and a login prompt will magically appear on your screen. :)
Anyway, it is time to login to the InterNIC! If I had an account on the InterNIC's system I would enter my InterNIC userID. But, since I do not have an account on this system, I have to find another way to access it. ;)
This is where the "anonymous" FTP I mentioned earlier comes in. An easy way to access most public FTP sites -- at least those FTP sites that allow outside access -- is to use the userid "anonymous". By using the name "anonymous", you are telling the FTP site that you are not a regular user, but you would still like to access their site, look around, and retrieve files.
So, where it says USER, I type the word
press the ENTER or RETURN key, and cross my fingers. If the InterNIC does not allow anonymous access, I am about to find out. :)
331 Guest login ok, send your email address as password. Password:
COOL! It's going to let me in. All I have to do is give the site a password.
Out of politeness to the FTP site, if you login as "anonymous", you need to use your full Internet e-mail address as your password. This helps the FTP site keep track of who has visited. So, since it wants my password, and since the password for any anonymous FTP session is my full Internet e-mail address, I type
BTW, this will probably freak you out the first time, but most FTP clients "hide" your anonymous FTP "password" (your e-mail address) as you type it. So, don't be too shocked if you type your e-mail address and nothing appears on your screen! That's normal. :)
After I type my e-mail address then press the ENTER or RETURN key, the following appears on my screen:
230 Guest login ok, access restrictions apply.
Notice that my screen says "access restrictions apply." This means that the site has given me access, but I only have access to the files that are available to the general public.
Okay ... now what? I have started up my FTP client, given the client an FTP address to connect to, identified myself to the remote site (I told it that I am "anonymous"), and given the site my password.
Now it's time to see what sort of files and directories are around, and to get those files ... which we will do tomorrow. :)
- See if your local Internet Service Provider has a handout on FTP commands.
- If you do not have FTP access, please be patient. I will show you how to access FTP by e-mail in MAP15.
(1) from "The EFF's Guide to the Internet," reprinted by permission. The stuff in brackets was added by me.
Originally written by Patrick Douglas Crispen