angelfire
Welcome to Dreambook, a nifty new free service from:
New Dream Network, Dreamhost, and Dreamservers!

If you have a minute, please sign my Dreambook too!


what your parents call you: Sextoys
what planet are you from??: Sextoys
so i can reach you: Sextoys
Homepage URL: http://sextoysex.com/makelove
where am I???: magiclly appeared
whats a guestbook without a comment???:[url=http://sextoysex.com/makelove]Sextoys[/url]
Tuesday, July 22nd 2008 - 01:07:52 AM
what your parents call you: Jason
what planet are you from??: San Diego
so i can reach you: jclu98@yahoo.com
Homepage URL: http://www.sd-gala.com
where am I???: magiclly appeared
whats a guestbook without a comment???:What a nice page! I really enjoyed my visit to your site. By the way,<a href=http://www.sd-gala.com>Chinese New Year Global Gala 2006</a> is coming to San Diego!<a href=http://www.sd-gala.com>The live performance of the Gala at San Diego</a> is scheduled on February 9, 2006, at the California Center for the Arts, Escondido. Don't miss this great chance if you're interested in <a href="http://www.gala.ntdtv.com">traditional Chinese culture and arts<a/>. Please ignore this or remove this message if you’re not interested. <a href="http://www.gala.ntdtv.com"> <img src="http://www.sd-gala.com/Images/chinese_new_year_gala.jpg" alt="Chinese New Year Global Gala 2006" border=0></a>
Tuesday, November 15th 2005 - 05:26:54 PM
what your parents call you: milk dud
what planet are you from??: the funnest one there is
so i can reach you: XBabyBrookesX@aol.com
Homepage URL: http://kissmybutt.com
where am I???: magiclly appeared
whats a guestbook without a comment???:your web site is awsome, email me some time
Saturday, June 19th 2004 - 05:53:17 PM
what your parents call you: milk dud
what planet are you from??: the funnest one there is
so i can reach you: XBabyBrookesX@aol.com
Homepage URL: http://kissmybutt.com
where am I???: magiclly appeared
whats a guestbook without a comment???:your web site is awsome, email me some time
Saturday, June 19th 2004 - 05:51:55 PM
what your parents call you: milk dud
what planet are you from??: the funnest one there is
so i can reach you: XBabyBrookesX@aol.com
Homepage URL: http://kissmybutt.com
where am I???: magiclly appeared
whats a guestbook without a comment???:your web site is awsome, email me some time
Saturday, June 19th 2004 - 05:53:15 PM
what your parents call you: Erin
what planet are you from??: Ewing
so i can reach you: erin@dustdesigns.net
Homepage URL: http://www.dustdesigns.net
where am I???: magiclly appeared
whats a guestbook without a comment???:Very cool site, i had fun visiting!
Monday, May 3rd 2004 - 08:01:59 PM
what your parents call you: Scott Galvin
what planet are you from??: ThinkRO
so i can reach you: scott@booce.com
Homepage URL: http://www.thinkro.com
where am I???: wondering through
whats a guestbook without a comment???:I love the site!!! It's got a great layout keep up the good work!
If you get a chance take a look at my site http://www.thinkro.com
Sunday, May 2nd 2004 - 03:09:03 AM
what your parents call you: Amanda Prada
what planet are you from??: earth
so i can reach you: where
Homepage URL: http://www.angelfire.com/poetry/authenticprada/questbooks.html
where am I???: magiclly appeared
whats a guestbook without a comment???:interesting websites interesting web sites interesting sites something interesting
interesting pictures
Saturday, December 6th 2003 - 07:35:04 AM
what your parents call you: zbestoffer.com
what planet are you from??: zbestoffer.com
so i can reach you: zbestoffer.com says yes
Homepage URL: http://www.zbestoffer.com
where am I???: wondering through
whats a guestbook without a comment???:Thanks and be sure to check out http://www.zbestoffer.com online auctions.
Tuesday, December 2nd 2003 - 12:47:09 PM
what your parents call you: prada
what planet are you from??: earth
so i can reach you: tff@flashmail.com
Homepage URL: http://www.angelfire.com/poetry/authenticprada/index.html
where am I???: wondering through
whats a guestbook without a comment???:The past is a source of knowledge, and the future is a source of hope. Love of the past implies faith in the future. - Stephen Ambrose
in Fast Company
Sunday, November 16th 2003 - 07:22:36 AM
what your parents call you: robot #11 wats kewl n wats not
what planet are you from??: garsplath
so i can reach you: with the phone( duhhhhhhhhhhh)
Homepage URL: http://www.robotsRus.knee.ca.com
where am I???: word of mouth
whats a guestbook without a comment???:hell-o your website is the suckeyist web site ever!!!!!!
you loser do you ever read yer guest book? i bet you dont cause if ya did then you would want 2 crawl in a hole and cry!!!!!!!!!!!!!!!!!!!!!!!!!!11

hates ya: robot #11 wats kewl n wats not

p.s i just wasted my time cause of u so u shold b contrarie maggie sleep wit 1 eye open!!!!
Thursday, November 6th 2003 - 01:39:22 AM
what your parents call you: Appleblossom Art
what planet are you from??: Saturn
so i can reach you: http://www.appleblossomart.com
Homepage URL: http://www.appleblossomart.com/
where am I???: magiclly appeared
whats a guestbook without a comment???:Lots of cool stuff. Keep expanding your website, it's great!
Monday, September 8th 2003 - 01:49:07 AM
what your parents call you: master
what planet are you from??: mars
so i can reach you: mars
Homepage URL: http://www.teen-sex-porn-movies.com
where am I???: word of mouth
whats a guestbook without a comment???:nice site lots of good reads hope u like my sites <a href="http://www.teen-sex-porn-movies.com/free_teen_hardcore_videos_1.html">free teen hardcore videos 1</a>
<a href="http://www.teen-sex-porn-movies.com/free_teen_hardcore_movie_75.html">free teen hardcore movie 75</a>
<a href="http://www.teen-sex-porn-movies.com/free_teen_hardcore_movies_45.html">free teen hardcore movies 45</a>
<a href="http://www.teen-sex-porn-movies.com/teen_hardcore_34.html">teen hardcore 34</a>
<a href="http://www.teen-sex-porn-movies.com/teen_hardcore_pic_45.html">teen hardcore pic 45</a>
<a href="http://www.teen-sex-porn-movies.com/teen_hardcore_pics_65.html">teen hardcore pics 65</a>
<a href="http://www.teen-sex-porn-movies.com/teen_hardcore_picture_75.html">teen hardcore picture 75</a>
<a href="http://www.teen-sex-porn-movies.com/teen_hardcore_pictures_456.html">teen hardcore pictures 456</a>
<a href="http://www.teen-sex-porn-movies.com/teen_hardcore_vid_776.html">teen hardcore vid 776</a>
<a href="http://www.teen-sex-porn-movies.com/teen_hardcore_vids_543.html">teen hardcore vids 543</a>
<a href="http://www.teen-sex-porn-movies.com/teen_hardcore_video_346.html">teen hardcore video 346</a>
<a href="http://www.teen-sex-porn-movies.com/teen_hardcore_videos_65.html">teen hardcore videos 65</a>
<a href="http://www.teen-sex-porn-movies.com/teen_hardcore_movie_3.html">teen hardcore movie 3</a>
<a href="http://www.teen-sex-porn-movies.com/teen_hardcore_movies_3.html">teen hardcore movies 3</a>
<a href="http://www.teen-sex-porn-movies.com/free_teen_gangbang_5.html">free teen gangbang 5</a>
<a href="http://www.teen-sex-porn-movies.com/free_teen_gangbang_pic_56.html">free teen gangbang pic 56</a>
<a href="http://www.teen-sex-porn-movies.com/free_teen_gangbang_pics_3.html">free teen gangbang pics 3</a>
<a href="http://www.teen-sex-porn-movies.com/free_teen_gangbang_pictures_163.html">free teen gangbang pictures 163</a>
<a href="http://www.teen-sex-porn-movies.com/free_teen_gangbang_vid_134.html">free teen gangbang vid 134</a>
<a href="http://www.teen-sex-porn-movies.com/free_teen_gangbang_vids_131.html">free teen gangbang vids 131</a>
<a href="http://www.teen-sex-porn-movies.com/free_teen_gangbang_video_131.html">free teen gangbang video 131</a>
<a href="http://www.teen-sex-porn-movies.com/free_teen_gangbang_videos_164.html">free teen gangbang videos 164</a>
<a href="http://www.teen-sex-porn-movies.com/free_teen_gangbang_movies_136.html">free teen gangbang movies 136</a>
<a href="http://www.teen-sex-porn-movies.com/free_teen_gangbang_movie_134.html">free teen gangbang movie 134</a>
<a href="http://www.teen-sex-porn-movies.com/teen_gangbang_147.html">teen gangbang 147</a>
<a href="http://www.teen-sex-porn-movies.com/teen_gangbang_pic_173.html">teen gangbang pic 173</a>
<a href="http://www.teen-sex-porn-movies.com/teen_gangbang_pics_133.html">teen gangbang pics 133</a>
Saturday, August 23rd 2003 - 08:52:31 PM
what your parents call you: bob
what planet are you from??: usa
so i can reach you: new_dis@lycos.com
Homepage URL: http://www.amazononlinecasino.com/
where am I???: magiclly appeared
whats a guestbook without a comment???:cool site!! keep up
Tuesday, August 12th 2003 - 01:50:52 AM
what your parents call you: Dynnell
what planet are you from??: Planet Vegeta
so i can reach you: ddlovers777@hotmail.com
Homepage URL: http://www.geocities.com/dnell7
where am I???: magiclly appeared
whats a guestbook without a comment???:Cool page. Peep ours.
<center>
<a href="http://www.geocities.com/dnell7"><img src="http://www.geocities.com/dnell7/images/banner.gif"></a>
</center>
Friday, August 8th 2003 - 10:04:59 AM
what your parents call you: Anna Prada
what planet are you from??: Prada
so i can reach you: robertstr@flashmail.com
Homepage URL: http://www.angelfire.com/wi/1nkyah00/npn2/index.html
where am I???: wondering through
whats a guestbook without a comment???:In prada we enjoy Mr. Eminem and the Russian Anna Kournikova. Do you also Mr. Nice Guestbook person poster of internet guestbook? ;) means wink and smile to be happy!
Thursday, July 17th 2003 - 01:46:13 PM
what your parents call you: jamie
what planet are you from??: mars
so i can reach you: by callin my name out loud
where am I???: magiclly appeared
whats a guestbook without a comment???:sjghaaahdfanhanhn
Friday, July 4th 2003 - 08:22:47 PM
what your parents call you: Princess
what planet are you from??: Earth- as far as I know
so i can reach you: I guess
Homepage URL: http://www.webspawner.com/users/simonne
where am I???: accidents do happen
whats a guestbook without a comment???:no comment
Sunday, June 15th 2003 - 07:14:10 AM
what your parents call you: Princess
what planet are you from??: Earth- as far as I know
so i can reach you: I guess
Homepage URL: http://www.webspawner.com/users/simonne
where am I???: accidents do happen
whats a guestbook without a comment???:no comment
Sunday, June 15th 2003 - 07:15:58 AM
what your parents call you: Shut-Up
what planet are you from??: Didjabringabeeralong
so i can reach you: zapdos1985@hotmail.com
Homepage URL: http://ihavebetterwaystowastemytime
where am I???: wondering through
whats a guestbook without a comment???:the e-mail is actually my ex bf. feel free to spam him away. not that ur not cool, but vindictiveness is my name. first, not middle. i'll decide later if i want you to know who i am.
Tuesday, May 13th 2003 - 01:50:10 PM
what your parents call you: angel
what planet are you from??: pluto
so i can reach you: PrInCeSs41123@yahoo.com
where am I???: wondering through
whats a guestbook without a comment???:ur planet is awsome
Thursday, May 1st 2003 - 05:20:45 PM
what your parents call you: jeep accessories
what planet are you from??: remulon
so i can reach you: tff@flashmail.com
Homepage URL: http://www.angelfire.com/hi5/jeep_accessories/
where am I???: accidents do happen
whats a guestbook without a comment???:black with dark green conjures the evils of Remogs spleen. - toban the mistless
Saturday, April 19th 2003 - 08:55:53 AM
what your parents call you: DILLON
what planet are you from??: MYANUS
so i can reach you: yes
where am I???: magiclly appeared
whats a guestbook without a comment???:YOUR SITE FUCKING BLOWS!
Thursday, March 27th 2003 - 08:19:24 PM
what your parents call you: gee
what planet are you from??: mars..
so i can reach you: reach me?
Homepage URL: http://www.internetmarketingandbusinesscentral.com/ispvipmillennium.htm
where am I???: wondering through
whats a guestbook without a comment???:Hi there. Interesting website you have here. Come and visit mine and sign my guestbook. C yer!
Sunday, February 16th 2003 - 03:57:31 AM
what your parents call you: asdasd
what planet are you from??: asdasd
so i can reach you: asdasda
where am I???: magiclly appeared
whats a guestbook without a comment???:asdasdasdasd
Thursday, January 30th 2003 - 02:54:26 AM
what your parents call you: geo
what planet are you from??: earth
so i can reach you: asd@asd.com
where am I???: accidents do happen
whats a guestbook without a comment???:Reference Linking the Web’s Scholarly Papers
Donna Bergmark&#8727; and Carl Lagoze†
Cornell Digital Library Research Group
November 7, 2000
Abstract
Along with the explosive growth of the Web has come a great increase
in online scholarly literature. This literature comes in many
forms. Informal online archives are repositories for papers and technical
reports. Proceedings are more and more commonly published on
the web. The collection of online journals is growing. Thus the web is
becoming an e&#64259;cient resource for up-to-date information for the scienti
&#64257;c researcher, and more and more researchers are turning to their
computers to keep current on results in their &#64257;eld. Not only is Web
retrieval usually faster than a walk to the library, but the information
obtained from the Web is potentially more current than what appears
in printed publications.
The increasing proportion of online scholarly literature makes it
possible to implement functionality desirable to all researchers – the
ability to access cited documents immediately from the citing paper.
Implementing this direct access is called “reference linking”.
This paper describes the object oriented approach the Digital Library
Research Group at Cornell has taken to help solve the reference
linking problem. This approach employs value-added surrogates to
enhance Web documents with reference-linking behavior. Given the
URL of an online paper, a Surrogate object is constructed for that
paper. The Surrogate fetches the content of the document and parses
it to automatically extract reference linking data. User applications
can then use the surrogate to access this reference, encoded in XML,
via a well-de&#64257;ned API.
We use this API to reference link the D-Lib magazine, an online
journal of technical papers relating to digital library research. Currently
we are (automatically) extracting reference linking information
from the papers in this journal with a rate of near 80% accuracy.
1 Background and Motivation
Reference Linking is actually an old idea. Classical reference linking
arose from a desire to study citation patterns among scholarly articles.
The Science Citation Index, founded by Eugene Gar&#64257;eld in the
&#8727;DARPA/CNRI Grant #2057/57-02
†NSF Grant # IIS-9907892
1
70’s, was invented to do just that, and was a spectacular success. It
was, however, based on human labor. For every paper examined, the
sta&#64256; captured that paper’s metadata, and then went to the reference
section and did the same for each reference there, or at least for those
references to journals covered by the SCI.
As a result, one could look up links using the Science Citation
Index and build a graph as shown in Figure 1. From this graph we
can observe that Paper C has 4 references, that Papers C, D, and G
have been analyzed, that Paper A has two citations, and that Papers
C and G are bibliographically coupled (i.e. they have a reference
in common). The links in the graph are explicitly contained in the
Science Citation Index.
A
B
C
D
E
F G
H
CLASSICAL REFERENCE LINKING
Observations:
4. Papers C and G are bibliographically coupled.
2. Papers C, D, and G have been analyzed.
1. Paper C has 4 references.
3. Paper A has 2 citations.
Figure 1: Classical Reference Linking
We then fast-forward some 25 years to the current time, where
there is a growing amount of scholarly literature online. Much of this
has HTML links to other works on the web. As in classical reference
linking, the references are inserted by authors. Some references are
accompanied by URLs, but not all.
Unlike SCI and classical reference linking, citations cannot be directly
discovered from the Web. It is a daunting task to analyze items
on the web to &#64257;nd out who might have cited a paper of interest.
Figure 2 shows how interlinked papers on the Web might exist.
The graph is implicit, de&#64257;ned by links between papers. It is likely
to be quite large. From the fragment shown here, we can deduce the
HTML page C has four links in it to other HTML pages; page A has
at present two links to it; and papers C and G are linked to a common
page. But, discovering this fragment from traveling the web is nearly
impossible. The graph exists implicitly on the Web.
In our reference linking project we are aiming somewhere between
the classical view and what exists today on the web. We wish to
make the graph in Figure 2 explicit, as well as supply additional links
where possible. We hope to augment the work currently being done by
CrossRef (which grew out of the DOIX project described by Atkins [1])
to link together the online copies of a group of scienti&#64257;c and technical
journals. Our work is directed at online work not covered by the DOI
initiative, and is in partnership with ECS at Southampton University
which is reference linking arXhiv, the technical report repository at
Los Alamos.
2
A
B
C
D
E
F G
H
Observations:
3. Paper A has 2 links to it (at present)
2. Links just happen - no analysis required.
1. HTML page C has 4 links on it
4. Papers C and G are linked to a common page
Figure 2: Linking on the Web
By making the links between online papers explicit, new applications
are possible. Figure 3 is just one example of a reference linking
application.
If GET is successful, the popup
window is replaced by a copy
of Mitchell’s seminal work.
while reading A)
(user clicks on "[10]"
Document A
-3-
...........................................
...........................................
...........................................
...........................................
...........................................
...........................................
...........................................
...........................................
...........................................
...........................................
...........................................
"...........Mitchell’s seminal work on
on thunks [10]." .....................
Popup Window
Status: retrieving....
[cancel]
[.ps] [.ps][.pdf]
10. Mitchell, A. Thunks
and Algo. JACM, March...
Figure 3: A Reference Linking Application
Imagine sitting in front of a computer screen, reading Document
A (or hearing it on your speakers, etc.) and you come across an
intriguing reference: “...Mitchel’s seminal work on thunks[10].” If
there is a copy of this work somewhere online, the “[10]” would be
turned into a clickable live link, so that the user could start fetching
that copy while continuing to read the original paper. One interface
that would support this goal might be a JavaScript popup window
that looks something like the one on the right side of Figure 3; the
complete reference string is shown along with some choices of format
(PostScript, pdf) in which the document might be retrieved; the user
can retrieve one of these or cancel.
Implementing the functionality shown in Figure 3 requires solving
at least two problems: 1) Figuring out that “[10]” is a reference and
that it matches the reference string, [10] Mitchell, A. Thunks and
Algol...; then parsing the reference string to decide what work it is
and whether it is linkable (this is a tough problem!) and whether it is
something we’ve seen before so we can credit Mitchell with a citation.
2) Turning the “[10]” into a live link. In HTML and PDF you can
3
turn this into an anchor that can be clicked. For other formats some
kind of auxiliary display is needed.
In any case the &#64257;rst problem is one of analysis and the second
is a presentation problem. Our work has been concentrating on the
analysis problem, which is the extraction of reference linking data from
online literature. An API, to be described in this paper, is responsible
for supplying this data to client applications.
2 Definitions
The previous section was a quick introduction to reference linking. In
this section we present some basic terms and de&#64257;nitions, so that we
can explore the problem in more detail.
2.1 Items and Works
There are two di&#64256;erent documents contained in Figure 3: there is
Document A which the user is reading, and there is thing B, a work
by Mitchell, which is referred to by A. There is a subtle, but important,
di&#64256;erence between A and B. A is an Item, something that has a format
type, is online, and can be analyzed by a computer program. B is a
Work, or an abstraction of a paper. This work will also exist in the
form of zero or more items. Some of them may even be online. We
say that B is one of A’s references. It probably even shows up in a
section of A titled References.
The words we just de&#64257;ned - Work for the abstract paper and Item
for a concrete instance of that paper – is taken from the IFLA model
[8, 10], shown in an abbreviated form in Figure 4. Since in dealing
with online literature one only cares aboutWorks and Items, we ignore
the middle two levels. In our experience with scholarly and scienti&#64257;c
publications, the reference is usually to the Work (rather than to, say,
a speci&#64257;c instance of that work held in a particular collection, in a
particular format or manifestation). See Svenonius [11] for a good
philosophical discussion of what a work is.
ITEM
WORK
Manifestations
& Expressions
Figure 4: IFLA Model
In the rest of this report, we drop the capitalization of work and
item, but continue to distinguish between the two terms.
4
2.2 References and Citations
Going back to Figure 3, item A references work B, an abstraction of
a paper by Mitchell. If in fact, a copy of Mitchell’s work can be found
online, then it is a linkable reference. A citation is the inverse of reference.
Here, the abstract paper of which A is an instance is a citation of
B. Tracking citations is not immediately needed for reference linking,
but is a valuable addition to any reference linking service. There is,
of course, a subtle di&#64256;erence in tractability of making, for an item, its
list of references and its list of citations. The labor involved in &#64257;nding
the citations is what made the SCI a huge success. The main thing to
note here is that like references, citations are works.
In the remainder of this paper, the term reference will refer to
the reference in the text of the paper being analyzed, e.g. [10] in
Figure 3, the context will be the sentence containing that reference,
and the reference string will be complete description of the work, e.g.
10. Mitchell. A. Thunks ....
2.3 Repository
A repository, also known sometimes as an archive, is any collection of
online items, e.g. an online journal, a department’s technical reports,
or a person’s online bibliography. A repository has some sort of special
identi&#64257;er. This project does not build repositories; it only analyzes
them for a variety of reference linking information.
2.4 Intralink and Interlink
If we analyzed every item in a repository, then we can intralink that
repository, since if one item references a work that is itself an item in
the repository, we have a linkable reference.
If we analyze several repositories, then we can interlink items in
these repositories. The extreme limit of this work, as more and more
items are analyzsed, is to interlink the Web, at least the scholarly side
of it.
3 The Reference Linking API
The reference linking architecture developed at Cornell is unique in
several respects. First, because we are aiming to link online literature
which has not been indexed by hand or accompanied by authorsupplied
metadata, we are taking an automatic approach to parsing
document source in order to extract the item’s metadata as well as
the item’s references’ metadata.
Secondly, we have a di&#64256;erent approach to collecting and storing reference
linking data. Most other reference linking projects (e.g. Open
Journals[5] and ResearchIndex[6]) use databases to store information
about works and do a lot of “database crunching”. For example,
there would be one database of all the titles, and perhaps another
database of all the authors, and a third with references. Instead of
5
using databases to store this information, we use item surrogates. A
surrogate is a digital object that encapsulates reference linking information
??and behaviors?? relating to one item ??in a repository.??
Reference linking data is thus distributed across the collection of surrogate
objects, and all the data relating to one item is grouped together
within a single surrogate.
This use of surrogates for reference linking is consistent with our
overall architectural approach in digital library research at Cornell.
We make use of “value-added surrogates” [9] as a vehicle for endowing
digital objects with a wide variety of extensible behaviors (e.g.
preservation, access management).
A third unusual aspect of reference linking at Cornell is that we
do not put together one monolithic reference linking service. Rather,
we provide an API on top of which such services can be built. Such
an approach has been quite successful in other, unrelated endeavors
(see, for example, [2]).
Having an API speci&#64257;es the operational semantics of reference linking;
it also allows us to cleanly separate the analysis phase of reference
linking from the presentation phase. The advantage of creating an API
is that no decision is made in advance of what the data should be used
for.
3.1 How the API Works
The combination of surrogates and an API essentially allows us to
walk up to a paper and ask it “what are your references” and “what
is your metadata?” One surrogate is instantiated for each repository
item, and can answer questions about that item. In fact, the API
includes a set of methods, where each method is simply one of the
questions or requests that can be directed at the surrogate. Each
surrogate answers the same set of questions (to the best of its ability).
A typical use of the API would be to analyze all the papers in
some collection or repository. This architecture is depicted in Figure 5.
The central column represents some repository of network-accessible
documents. The items listed in this column are linkable (they are
online) and therefore analyzable (we have their bits).
open archive,
D-Lib, etc.
other
copies
bibliographic
data
dissemination
Other
Work
:
:
Item
Item
surrogate
surrogate Work
repository repository
Figure 5: An Architecture for Reference Analysis
On the left are drawn the works that the items represent. Any
work might have several copies spread across several archives. All of
these copies are “items” corresponding to that work. If more than one
copy of a work is encountered, we could pool the information collected
6
so that both surrogates have consistent data, but this requires either
that the surrogates be able to &#64257;nd and communicate with each other,
or that there be a central database. Arranging for the surrogates to
communicate among themselves is an interesting research problem;
for now we keep a small database of works seen so far which at least
allows sketchy information to be updated.
To the right of the archive items are the surrogates, shown as
“blobs”. They know how to disseminate bibliographic data about
the item, and indirectly, about the work. As stated above, client
applications ask the questions and then display or otherwise use the
results. The API supplies the data.
4 Two-PhaseArchitecture
Up to this point, we have discussed the API: its methods and outputs.
However, recall that the application shown in Figure 3 requires solving
two very di&#64259;cult problems: analysis, to &#64257;nd the references; and
presentation of the live references. Figure 6 shows this two-phased
architecture with structured data – XML – at the interface. Suppose
in this case that the XML is in response to “getLinkedText”.
XML
Item,
with
links
Rep of
item
............... ARCHIVE
.ps
.pdf
.tex
.dvi
.txt
.htm
:
batch processor
browser/renderer
XSL
...
..............
.....
..............
[10]
...........
...........
..........
..........
..........
(Work metadata)
databases
. . .
(other disseminations
- see API)
ANALYSIS DISPLAY
Surrogates
Figure 6: Overall Reference Linking Architecture
.
The “links” contained in the XML output of getLinkedText()
are elements of our own devising. They can be translated (by a
xslt processor) into “actionable links”, such as HREF’s, XLinks, or
OpenURLS. Our link elements, <reflink>, are su&#64259;ciently rich to
point to various on-line copies of the reference, to retrieve the reference
string itself, and so on. Figure 7 shows an example <reflink>
element, along with how it might look after being converted into an
XLink of type simple.
4.1 Components of the API
Surrogates could answer a number of di&#64256;erent questions, but the four
primary questions in the Cornell reference linking API are:
7
Original Text:
... it was said [5] that ...
Linked Text with custom tag:
<reflink ord="5" author="last-name-of-first-author"
title="title of this work"
year="1999"
url="http://www.some.org/filename">[5]</reflink>
Linked Text with XLink:
<ref-xl xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple"
xlink:href="http://www.some.org/filename">[5]</ref-xl>
that...
Figure 7: A linked XML Item, first with reflink then with XLink.
8
• getLinkedText – contents of the paper (as data) augmented
with reference linking information. This method would be invoked
by browsers that wanted to display the document with
some of its references turned into anchors of live links, as in
Figure 3.
• getReferenceList – this interface would be used by applications
that wish to know what references are contained in this paper.
For example, if one were building the SCI, this would be the
question to ask, along with the next one.
• getMyData - this returns that paper’s own metadata. This is not
directly related to reference linking, but is required for building
up citation relationships. It could have other uses; for example,
one client might have a button labeled “get BibTeX”; when the
button is pushed, the client invokes getMyData on the surrogate,
and reformats the results into something suitable for cutting and
pasting into a LaTeX bibliography.
• getCurrentCitationList – the list of works citing this paper
to the best of the surrogate’s knowledge. As stated before, this
function is not strictly required for reference linking, but would
be very useful to client applications that want to know what
other documents cite this one, as they might be related or provide
more current information. If online, we have a linkable citation.
In addition to these API methods, surrogates can be told to save
themselves and they can be resurrected from stored data.
4.2 Output from the API
Figure 5 showed the surrogates disseminating bibliographic information
about their items, in response to a particular method in the API
being invoked. Each method returns a byte-stream of structured data
coded in XML, to permit further processing. For example, one method
in the API is getReferenceList, which returns harvested metadata
for each reference contained in a repository item, such as its title, publication,
context in which it was cited, year and authors. This data,
encoded in XML, is suitable for further processing by other applications.
Figure 8 shows what part of the XML information disseminated
by getReferenceList might look like. This component is the second
referenced (ord="2") of this surrogate’s item.
First comes bibliographic data related to the reference work. We
are using Dublin Core for convenience, so for example, dates must be
in CCYY-MM-DD format.
Next comes item-related information, such as the reference string
exactly as it appeared in the item (enclosed in a <literal> element
and enti&#64257;ed), and all the contexts in which the work was cited. The
context is usually one complete sentence, as shown near the bottom
of Figure 8. Note the “[2]” in the context. Since the Maly paper does
have a URL, this may become the anchor of a live link in any text
returned by a call to this surrogate’s getLinkedText method.
9
<api:reference_list length="17"
xmlns:api="http://www.cs.cornell.edu/cdlrg/..."
xmlns:dc="http://purl.org/DC">
<api:reference ord="1">
:
:
<api:reference ord="2">
<dc:title>
Smart Objects, Dump Archives: A User-Centric,
Layered Digital Library Framework
</dc:title>
<dc:date>1999-03-01</dc:date>
<dc:identifier>10.1045/march99-maly</dc:identifier>
<dc:creator>K Maly</dc:creator>
<api:displayID>
http://www.dlib.org/dlib/march99-maly/03maly.html
</api:displayID>
<api:literal tag="2.">
Maly K, "Smart Objects, Dumb Archives: A User-Centric,
Layered Digital Library Framework" in D-Lib Magazine,
March 1999,
&lt;http://www.dlib.org/dlib/march99-maly/03maly.html&gt;.
</api:literal>
<api:context list>
<api:context>
The need for standards to support the interoperation of
digital library systems has been reported on before in
D-Lib[1],[2] as have efforts to discover common ground
in related standard processes(Dublin Core and INDECS[3]).
</api:context>
</api:context list>
</api:reference>
:
:
</api:reference_list>
Figure 8: XML for a Reference Object
10
5 A Java Implementation of the API
The API can be easily implemented in Java, Perl, or even as part of
a larger protocol. Our Java implementation will brie&#64258;y be discussed
in this section. Readers uninterested in implementation details may
skip directly to Section 4.
The API is implemented as three packages, only one of which
(Linkable.API) is needed by client applications. The other packages
include one for parsing of source documents (Linkable.Analysis)
and another for helper routines (Linkable.Utility).
Only one parameter is required for constructing a surrogate object,
the URL of the item to be parsed. The surrogate invokes one or
another analyzer depending on the item’s format. Typically the item
is translated to XML before further analysis. Formatting hints are
retained in the XML version, to enable decomposition of the item into
header, body, and reference sections.
When the surrogate is returned to the client application, the item
has been parsed and preliminary reference data has been stored into
data &#64257;elds within the surrogate. Invoking one of the four methods on
the surrogate, e.g. getLinkedText(), causes further analysis of the
reference data and culminates in an XML byte array.
The surrogates can be constructed and used on the &#64258;y and then
discarded, or they may be stored in a repository for further use. This
allows for a wide range of applications, from constructing a database
of citation information to providing a completely dynamic reference
linking service.
The Java implementation consists of less than 6000 lines of code
and uses both dom and sax parsing of XML data.
6 Applications
The reference linking API can be used for a large variety of applications.
This section brie&#64258;y sketches two of them.
6.1 A Simple Display Application
handle
server
DLIB Surrogate XML file
DOI some URL
Figure 9: A Simple Reference Linking Application
In Figure 9, the client application is given the URL of some online
item. (Alternatively, the application might instead be handed a DOI,
and then use a handle server[4, 7] to get a URL.) In the case of Java,
the application instantiates a surrogate object, passing it that URL.
Instantiation of a surrogate is what causes an item to be analyzed.
All further interactions with the reference linking API are via this
surrogate.
11
The right-hand side of Figure 9 shows the client application invoking
various methods on the surrogate. Here is a sample snippet of
Java code that might appear in such an application:
Surrogate s = new Surrogate ( url );
clientDisplay ( s.getLinkedText() );
This application uses the API to obtain the linked text for the item
located at the speci&#64257;ed url; the result of this request is a XML byte
array, which is then passed to a routine, clientDisplay(), which will
display the linked text to a user. For a display similar to that shown
in Figure 3, the steps in the presentation would be as follows:
1. Run xslt or a similar translator to convert the API’s <reflink>
elements into an “actionable link”, such as a URL, an XLink, an
OpenURL, or JavaScript code.
2. Display the translated XML object to the user.
3. When the user clicks on a reference that has a live link, bring up
the retrieving... dialogue, showing the complete reference string,
and show what formats exist for this work.
4. If the user clicks on the cancel button, quit. Otherwise retrieve
the format selected by the user and display it in a separate window.
This example has shown how the reference linking API would be used
on the &#64258;y to display to a user an online item with live links to linkable
references.
6.2 Reference Linking the D-Lib Magazine
We are currently using the Java implementation of the reference linking
API in batch mode to analyze D-Lib articles. D-Lib is an online
journal that has been appearing eleven times a year since July 1995;
it makes an excellent test bed for automatic extraction software because
there is little editorial imposition on the format of the papers
submitted to the journal, and therefore provides a wide selection of
paper layouts. All D-Lib articles are written in HTML.
Figure 10 illustrates the major steps in analyzing a D-Lib paper.
The application, running from the command line, (1) inputs a &#64257;le of
D-Lib URLs. (The &#64257;le was automatically generated from D-Lib table
of contents pages.) For each URL, the application (2) constructs a
surrogate object, which proceeds to extract reference linking information,
and (3) returns itself to the application; the application simply
(4) stores the surrogate. The Java code to perform this processing is
as follows:
Surrogate s = new Surrogate ( url );
s.save();
(The reference linking API contains save() and restore() surrogate
methods). At some future date, that surrogate can be used to respond
12
urls application
D-Lib
surrogates
surrogate
read
(1)
(3) a surrogate
for this item
(4)save
(2) construct a surrogate
for this url
Figure 10: The application to intralink D-Lib.
to Open Archive requests, to provide data for a reference linking application,
to build a citation database, etc.
The next section evaluates the accuracy of parsing D-Lib papers.
If more accuracy is needed, it is certainly possible to run an o&#64260;ine
“upgrade” procedure which allows a human to edit private surrogate
data. When an edited surrogate is resurrected, it will have the upgraded
information. Currently, however, we see no need to do this for
D-Lib.
7 Results
Because our approach extracts all reference linking and bibliographic
data automatically, it cannot be expected that the data will be 100%
accurate. Fortunately (unlike for library services) a reference linking
service for online documents does not have to be completely accurate.
Rather, one aims for the “sweet spot” where at least one copy of
the reference can be retrieved (so recall is not that important), and
where there are not too many false links (precision has to be good
enough). We believe that an 80% accuracy level is su&#64259;cient for most
applications.
Our current results show that we are very near to achieving this
desired level. The accuracy of our parsing has improved considerably
as more and more papers have been parsed.
There are two categories of parsing errors: incorrectly extracting
bibliographic data about the item being analyzed; and incorrectly
parsing the reference strings contained in the analyzed items. We
therefore devised a performance metric based on both of these inputs.
For each item analyzed, the item accuracy is the number of elements
parsed correctly, divided by the total number of elements in the
item. Speci&#64257;cally, some of the elements used are: the item’s title, the
item’s authors (each author counts as one element), the item’s year of
publication, the reference contexts (each contex counts as one element)
and the average reference accuracy times the number of references.
The reference accuracy for one reference string is the per centage of
its elements that are correctly parsed. These elements include: title,
each author, year, contexts, and URL (if present). To give a concrete
feeling for how the metric is calculated, Figure 11 shows a hypothetical
item, the parsing results, and calcluation of the item accuracy.
13
Reference Accuracy (16 items)
Number Number Reference Number Number Reference
Ordinal Elements correct Accuracy Ordinal Elements correct Accuracy
1 7 4 57 9 4 3 75
2 5 1 20 10 5 5 100
3 5 5 100 11 5 5 100
4 5 5 100 12 8 6 75
5 7 7 100 13 5 2 40
6 5 5 100 14 6 6 100
7 4 1 25 15 5 1 20
8 7 6 86 16 4 1 25
Total Reference Accuracy = 1123; Average = 1123/16 = 70.19
Item Accuracy
How Many
What How Many Correct %
title 1 1
authors 2 0
year 1 1
contexts 8 8
references 16 11
Totals 28 21 75%
Figure 11: Example of Item Accuracy for hypothetical item with 2 authors,
16 references and 8 reference contexts. First calculate the average Reference
Accuracy (top figure, 70%). Then in the bottom table, use 70% of 16 (11)
references as the average accuracy of reference parsing. The Item Accuracy
metric is then 21 divided by 28, or 75%.
14
Figure 12: Item Accuracies for a set of 28 D-Lib papers
Figure 13: Reference Accuracies for a set of 26 D-Lib papers
We have processed a set of 29 D-Lib papers. Of this number, 3
were not able to be converted to XML (i.e. XHTML) and so were
discarded. NOTE: RESULTS HERE ARE NOT YET COMPLETE.
Plots 12 and 13 will be extended as more D-Lib
papers are analyzed. For the remainder, item accuracies were
determined by human inspection of the data contained by stored surrogates;
the item accuracy is plotted in Figure 12. As can be seen,
most of the items lie above our desired 80% level of accuracy.
The collection of references is much larger and varied than the
items in a single repository. Figure 13 shows the accuracy of parsing
the references in the same set of D-Lib papers. Again the majority of
the references parse to the desired degree of accuracy, with a surprising
number parsed perfectly. In fact the overall level of accuracy is above
80%.
While the overall averages are acceptable, it is harder to get accu-
15
D-Lib 1995 to August 2000: Metadata Extraction Subsample
Description Number % of Total Number % of Total
Number of D-Lib papers: 280 100 29 100
Converted to XHTML: 220 79 26 90
Extraction is Perfect 5 19
Good (70% or more) 13 50
Poor (below 70%) 8 31
Table 1: Number of D-Lib items whose bibliographic data was correctly
extracted. The rightmost 2 columns are the subset of D-Lib papers processed
to date. The bottom 3 rows are a per centage of row 2, that is, of the items
that could be turned into XHTML.
D-Lib 1995 though August 2000 Subsample
Description Number % of Total Number % of Total
Number of References: 100 266 100
Parsing is Perfect 149 56
Good (70% or more) 55 21
Poor (below 70%) 62 23
Table 2: Number of correctly parsed references in D-Lib Papers. This table
is incomplete. The two right-most columns show the results for 28 D-Lib
papers that contain 266 references
racy concentrated into one place – that is, all the item’s metadata and
each of the item’s references gets parsed correctly. We therefore look
at how often it was possible to perfectly extract a paper’s metadata,
which would correspond to the number of times the user would get
a perfect answer in response to the getMyData() method. We also
looked at how often references in a paper are perfectly parsed, which
corresponds to the quality of the response to the getReferenceList
request. The results are contained in Tables 1 and 2. NOTE: RESULTS
HERE ARE NOT YET COMPLETE. Tables 1 and
2 will be filled in as more D-Lib papers are analyzed.
8 Conclusions
This project shows that automatic extraction of reference linking information
is very di&#64259;cult to get right. The extraction of reference linking
data is di&#64259;cult mainly because parsing text produced by many di&#64256;erent
authors in many di&#64256;erent formats with many di&#64256;erent conventions
is problematical. However, we have found that there are a relatively
limited set of variations in format, and have successfully developed
grammars to handle most of them. A separate paper [3] discusses this
problem in more detail, and presents some algorithms for extracting
reference linking information.
At this point we are analyzing papers, examining the errors, patch-
16
ing up the Java API, and then analyzing new papers. As each additional
paper gets processed, the implementation improves a little. If
we look at the proportion of elements that can be correctly extracted
from an item or from a reference, we have 79% item accuracy and
more than 80% reference accuracy.
Of course, using any available metadata would improve this accuracy.
But because such metadata has only recently begun to be available,
we extract this information ourselves. It should be noted that
the Open Archives initiative asks authors to submit metadata along
with their papers. A tool like that described in this paper would be
helpful in providing an initial data set which could then be re&#64257;ned by
the author during the submission procedure.
ResearchIndex also automatically extracts data from items discovered
online, and does a remarkably good job. Its main strength lies
in applying clustering methods and other arti&#64257;cial intelligence techniques
to the analyzed material. Our software does not incorporate
AI methods, but does almost as well.
The work done so far indicates that the architecture and design for
the reference linking API are sound. The object-oriented API makes
it exceptionally easy to build new reference linking applications.
17
References
[1] H. Atkins, C. Lyons, H. Ratner, C. Risher, C. Shillum,
D. Sidman, and A. Stevens. Refererence linking with
DOIs: A case study. D-Lib Magazine, 6(2), February 2000.
<http://www.dlib.org/dlib/february00/02risher.html>
[2] D. Bergmark and S. Keshav. Building blocks for IP telephony.
IEEE Communications Magazine, 38(4):88–94, April 2000.
[3] Donna Bergmark. Automatic extraction of reference linking information
from online documents. Technical report, Cornell Computer
Science Department, October 2000. in preparation.
[4] Priscilla Caplan and William Arms. Reference linking for
journal articles. D-Lib Magazine, 5(7/8), July/August 1999.
<http://www.dlib.org/dlib/july99/caplan/07caplan.html>
[5] Steve Hitchcock, Les Carr, Wendy Hall, Stephen Harris, S. Probets,
D. Evans, and D. Brailsford. Linking electronic journals:
Lessons from the Open Journal project. D-Lib Magazine, December
1998.
[6] Steve Lawrence, C. Lee Giles, and Kurt Bollacker. Digital libraries
and autonomous citation indexing. IEEE Computer,
32(6):67–71, 1999. <http://www.researchindex.com>
[7] Norman Paskin. DOIs and reference linking, February 1999. A
presentation to the NISO/NFAIS/SSP Linking Workshop, available
online at http://www.niso.org/paskin.html
[8] Norman Paskin. E-citations: actionable identi&#64257;ers and scholarly
referencing, 1999. <http://www.doi.org/citations.pdf>
[9] Sandra Payette and Carl Lagoze. Value-added surrogates for distributed
content. D-Lib Magazine, 6(6), June 2000.
[10] K. G. Saur. Functional requirements for bibliographic records,
1998. UBCIM Publications - New Series Vol. 19.
[11] Elaine Svenonius. The Intellectual Foundation of Information
Organization. M.I.T. Press, 2000.
18
Thursday, January 30th 2003 - 02:48:11 AM
what your parents call you: cwcho
what planet are you from??: taiwan
so i can reach you: c
Homepage URL: http://home.kimo.com.tw/bomeaya
where am I???: magiclly appeared
whats a guestbook without a comment???:execuse me...
Please help me finish my dream..
my dream webpage is
http://home.kimo.com.tw/bomeaya/

Thank you so much
Thursday, January 16th 2003 - 06:15:10 PM
what your parents call you: pussy galore
what planet are you from??: uranus
so i can reach you: give it a tug
Homepage URL: http://www.xxxspitroast.com)wifelovers.htm
where am I???: magiclly appeared
whats a guestbook without a comment???:great site now try these
http://www.121celebs.com/index.html
http://www.121celebs.com/index2.html
http://www.121celebs.com/index3.html
http://www.121celebs.com/index4.html
http://www.121celebs.com/index5.html

http://www.121celebs.com/index6.html
http://www.121celebs.com/index7.html
http://www.121celebs.com/index8.html
http://www.121celebs.com/index9.html
http://www.121celebs.com/index10.html
http://www.121celebs.com/index11.html
http://www.121celebs.com/index12.html

http://www.121celebs.com/index13.html
http://www.121celebs.com/index14.html
http://www.121celebs.com/index15.html
http://www.121celebs.com/index16.html
http://www.121celebs.com/index17.html
http://www.121celebs.com/index18.html
http://www.121celebs.com/index19.html

http://www.121celebs.com/index20.html
http://www.121celebs.com/index21.html
http://www.121celebs.com/index22.html
http://www.121celebs.com/index23.html
http://www.121celebs.com/index24.html
http://www.121celebs.com/index25.html
http://www.121celebs.com/index26.html

http://www.121celebs.com/index27.html
http://www.121celebs.com/index28.html
http://www.121celebs.com/index29.html
http://www.121celebs.com/index30.html
http://www.121celebs.com/index31.html
http://www.121celebs.com/index32.html
http://www.121celebs.com/index33.html

http://www.121celebs.com/index34.html
http://www.121celebs.com/index35.html
http://www.121celebs.com/index36.html
http://www.121celebs.com/index37.html
http://www.121celebs.com/index38.html
http://www.121celebs.com/index39.html
http://www.121celebs.com/index40.html

http://www.121celebs.com/index41.html
http://www.121celebs.com/index42.html
http://www.121celebs.com/index43.html
http://www.121celebs.com/index44.html
http://www.121celebs.com/index45.html
http://www.xxxspitroast.com
http://www.xxxspitroast.com
http://www.xxxspitroast.com
http://www.halle-berry-nude-fakes-free-pics.com/
http://www.xxxspitroast.com
http://www.xxxspitroast.com
http://www.xxxspitroast.com
http://www.xxxspitroast.com

http://www.xxxspitroast.com/wifelovers.htm
Sunday, January 12th 2003 - 04:35:09 PM
what your parents call you: pussy galore
what planet are you from??: moon
so i can reach you: me@anywhere.com
Homepage URL: http://www.xxxspitroast.com
where am I???: magiclly appeared
whats a guestbook without a comment???:great site now try these
http://www.121celebs.com/index.html
http://www.121celebs.com/index2.html
http://www.121celebs.com/index3.html
http://www.121celebs.com/index4.html
http://www.121celebs.com/index5.html

http://www.121celebs.com/index6.html
http://www.121celebs.com/index7.html
http://www.121celebs.com/index8.html
http://www.121celebs.com/index9.html
http://www.121celebs.com/index10.html
http://www.121celebs.com/index11.html
http://www.121celebs.com/index12.html

http://www.121celebs.com/index13.html
http://www.121celebs.com/index14.html
http://www.121celebs.com/index15.html
http://www.121celebs.com/index16.html
http://www.121celebs.com/index17.html
http://www.121celebs.com/index18.html
http://www.121celebs.com/index19.html

http://www.121celebs.com/index20.html
http://www.121celebs.com/index21.html
http://www.121celebs.com/index22.html
http://www.121celebs.com/index23.html
http://www.121celebs.com/index24.html
http://www.121celebs.com/index25.html
http://www.121celebs.com/index26.html

http://www.121celebs.com/index27.html
http://www.121celebs.com/index28.html
http://www.121celebs.com/index29.html
http://www.121celebs.com/index30.html
http://www.121celebs.com/index31.html
http://www.121celebs.com/index32.html
http://www.121celebs.com/index33.html

http://www.121celebs.com/index34.html
http://www.121celebs.com/index35.html
http://www.121celebs.com/index36.html
http://www.121celebs.com/index37.html
http://www.121celebs.com/index38.html
http://www.121celebs.com/index39.html
http://www.121celebs.com/index40.html

http://www.121celebs.com/index41.html
http://www.121celebs.com/index42.html
http://www.121celebs.com/index43.html
http://www.121celebs.com/index44.html
http://www.121celebs.com/index45.html
http://www.xxxspitroast.com
http:www.xxxspitroast.com
http:www.xxxspitroast.com
http://www.halle-berry-nude-fakes-free-pics.com/
http:www.xxxspitroast.com
http:www.xxxspitroast.com
http:www.xxxspitroast.com
http:www.xxxspitroast.com
Saturday, January 11th 2003 - 04:14:35 AM
what your parents call you: pussy galore
what planet are you from??: moon
so i can reach you: me@anywhere.com
Homepage URL: http://www.xxxspitroast.com
where am I???: magiclly appeared
whats a guestbook without a comment???:great site now try these
http://www.121celebs.com/index.html
http://www.121celebs.com/index2.html
http://www.121celebs.com/index3.html
http://www.121celebs.com/index4.html
http://www.121celebs.com/index5.html

http://www.121celebs.com/index6.html
http://www.121celebs.com/index7.html
http://www.121celebs.com/index8.html
http://www.121celebs.com/index9.html
http://www.121celebs.com/index10.html
http://www.121celebs.com/index11.html
http://www.121celebs.com/index12.html

http://www.121celebs.com/index13.html
http://www.121celebs.com/index14.html
http://www.121celebs.com/index15.html
http://www.121celebs.com/index16.html
http://www.121celebs.com/index17.html
http://www.121celebs.com/index18.html
http://www.121celebs.com/index19.html

http://www.121celebs.com/index20.html
http://www.121celebs.com/index21.html
http://www.121celebs.com/index22.html
http://www.121celebs.com/index23.html
http://www.121celebs.com/index24.html
http://www.121celebs.com/index25.html
http://www.121celebs.com/index26.html

http://www.121celebs.com/index27.html
http://www.121celebs.com/index28.html
http://www.121celebs.com/index29.html
http://www.121celebs.com/index30.html
http://www.121celebs.com/index31.html
http://www.121celebs.com/index32.html
http://www.121celebs.com/index33.html

http://www.121celebs.com/index34.html
http://www.121celebs.com/index35.html
http://www.121celebs.com/index36.html
http://www.121celebs.com/index37.html
http://www.121celebs.com/index38.html
http://www.121celebs.com/index39.html
http://www.121celebs.com/index40.html

http://www.121celebs.com/index41.html
http://www.121celebs.com/index42.html
http://www.121celebs.com/index43.html
http://www.121celebs.com/index44.html
http://www.121celebs.com/index45.html
http://www.xxxspitroast.com
http:www.xxxspitroast.com
http:www.xxxspitroast.com
http://www.halle-berry-nude-fakes-free-pics.com/
http:www.xxxspitroast.com
http:www.xxxspitroast.com
http:www.xxxspitroast.com
http:www.xxxspitroast.com
Saturday, January 11th 2003 - 04:14:12 AM
what your parents call you: Ass Hole
what planet are you from??: Venus
so i can reach you: lancaster93534@yahoo.com
where am I???: wondering through
whats a guestbook without a comment???:Hi angelfire...I really am not a asshole but my parents call me that anyway...lol! Dont know much about you but I decided to drop you a line anyway...You take care and i hope i get to hear from you soon....
Wednesday, December 11th 2002 - 10:34:37 PM
what your parents call you: Ass Hole
what planet are you from??: Venus
so i can reach you: lancaster93534@yahoo.com
where am I???: wondering through
whats a guestbook without a comment???:Hi angelfire...I really am not a asshole but my parents call me that anyway...lol! Dont know much about you but I decided to drop you a line anyway...You take care and i hope i get to hear from you soon....
Wednesday, December 11th 2002 - 10:30:44 PM
what your parents call you: Bone _Head
what planet are you from??: A Sexxy One
so i can reach you: brit_brat_420@hotmail.com
Homepage URL: http://I dont have one
where am I???: magiclly appeared
whats a guestbook without a comment???:Hello I Lve Some1 Very Special
Sunday, November 24th 2002 - 11:23:42 AM
what your parents call you: Smart, but lazy.
what planet are you from??: Alpha Centauri
so i can reach you: grinningghost@grimggrinningghosts.com
where am I???: accidents do happen
whats a guestbook without a comment???:Over this past weekend, I tried "BOUNCE" dryer sheets and was quite disappointed. Although I liked the fresh scent, I found the sheets to be impractically small and almost completely non-absorbant. Consequently, my clothes are still wet. Do you use "BOUNCE"?
Sunday, October 20th 2002 - 09:15:08 PM
what your parents call you: me
what planet are you from??: earth
so i can reach you: nowhere
Homepage URL: http://kool///jk
where am I???: accidents do happen
whats a guestbook without a comment???:nothin reely
Sunday, October 13th 2002 - 04:21:45 AM
what your parents call you: me
what planet are you from??: earth
so i can reach you: nowhere
Homepage URL: http://kool///jk
where am I???: accidents do happen
whats a guestbook without a comment???:nothin reely
Sunday, October 13th 2002 - 04:21:39 AM
what your parents call you: Stupid
what planet are you from??: New York
so i can reach you: With your arms
Homepage URL: http://www.guitar-pickups.com
where am I???: magiclly appeared
whats a guestbook without a comment???:stay cool!
Thursday, October 3rd 2002 - 12:45:10 PM
what your parents call you: Entertainment Database
what planet are you from??: Earth
so i can reach you: 35r@34qfrt.com
Homepage URL: http://www.entertainmentdatabase.com
where am I???: word of mouth
whats a guestbook without a comment???:Entertainment Database
http://www.entertianmentdatabase.com

Complete worldwide database of the entertainment
industry. Film, Music, Modeling, Adult, Game, & More.
Tuesday, October 1st 2002 - 05:56:35 PM
what your parents call you: Bob Yest
what planet are you from??: earth
Homepage URL: http://www.greatwebsex.com/index2.htm
where am I???: magiclly appeared
whats a guestbook without a comment???:kewl design
Tuesday, October 1st 2002 - 01:28:35 PM
what your parents call you: coma
what planet are you from??: U.S.
Homepage URL: http://thecomaproject.com
where am I???: word of mouth
whats a guestbook without a comment???:aware
Tuesday, October 1st 2002 - 01:29:26 AM
what your parents call you: Dan Ross
what planet are you from??: Miami
Homepage URL: http://www.travel-ascending.com/ski-lodging/
where am I???: wondering through
whats a guestbook without a comment???:We loved your site and wil visit again. Best of luck!
Friday, September 27th 2002 - 10:11:34 AM
what your parents call you: Doug
what planet are you from??: Not Sure
so i can reach you: I'll contact you sparky!
Homepage URL: http://www.dougmeade.com
where am I???: accidents do happen
whats a guestbook without a comment???:Nice Site... I was just surfing Yahoo! and dropped in. :)
Tuesday, September 24th 2002 - 01:33:55 PM
what your parents call you: Hey you
what planet are you from??: This one
so i can reach you: huh?
Homepage URL: http://www.ps2-dir.com
where am I???: word of mouth
whats a guestbook without a comment???:Hmm...
Tuesday, September 24th 2002 - 02:58:40 AM
what your parents call you: Carrie
what planet are you from??: Earth?
Homepage URL: http://www.123scrapbook.com
where am I???: magiclly appeared
whats a guestbook without a comment???:Hi!
Thursday, September 19th 2002 - 11:24:27 PM
what your parents call you: 1
what planet are you from??: 1
so i can reach you: 1
Homepage URL: http://1
where am I???: accidents do happen
whats a guestbook without a comment???:<!-- BEGIN EasyTAF REFERRAL CODE -->
<A HREF="http://www.EasyTAF.com/cgi-bin/taf/referrals/referral.cgi?userid=xxxxx" TARGET="_blank">
<IMG SRC="http://www.EasyTAF.com/taf/images/easytaf1.gif" BORDER="1">
</A>
<!-- END EasyTAF REFERRAL CODE-->
Tuesday, September 17th 2002 - 05:43:31 PM
what your parents call you: sporksoma
what planet are you from??: helios
so i can reach you: sporksoma@yahoo.com
Homepage URL: http://www.geocities.com/sporksoma/index.html
where am I???: accidents do happen
whats a guestbook without a comment???:I loved the virtual birthstone!! I've never seen it before, glad I got to ^_^


Do you want to live forever?    Click here!
http://www.alexchiu.com/affiliates/clickthru.cgi?ID=sporksoma
Monday, September 16th 2002 - 12:10:56 PM
what your parents call you: mafer
what planet are you from??: earth
so i can reach you: i guess
Homepage URL: http://www.kleykulele.com/fercoby
where am I???: accidents do happen
whats a guestbook without a comment???:nice site.. actually I haven't see all, but it seems good :) keep rockin
Sunday, September 15th 2002 - 08:13:10 PM
what your parents call you: zbestoffer.com Auctions
what planet are you from??: USA, New York
Homepage URL: http://www.zbestoffer.com
where am I???: magiclly appeared
whats a guestbook without a comment???:Thanks for letting us sign your guestbook. <br>
zbestoffer.com is the hottest auction site. Lowest listing fees around with no percentages. No buying fees. Free image hosting. Bid, buy, or sell antiques, collectibles, computers, cars, trucks, automobiles, electronics, real estate, and more. Register today for free to begin enjoying the benefits of the zbestoffer.com community. Thanks and be sure to check it out!
Saturday, September 14th 2002 - 10:45:54 AM
what your parents call you: hi
what planet are you from??: hi
so i can reach you: hi
where am I???: accidents do happen
whats a guestbook without a comment???:HI!!!!
Thursday, September 12th 2002 - 12:37:40 PM
what your parents call you: b
what planet are you from??: b
so i can reach you: b
where am I???: magiclly appeared
whats a guestbook without a comment???:<h3>tribe?<xmp><plaintext><--
Wednesday, September 11th 2002 - 09:35:24 PM
what your parents call you: tamara
what planet are you from??: earth
so i can reach you: silvershadow3@hotmail.com
Homepage URL: http://www.freewebs.com/420tamara420/
where am I???: wondering through
whats a guestbook without a comment???:hey kool sight!!! i tryed to click on a few of your links, but they never worked...please check out my WEBPAGE, and be srue to sign my guestbook! thanx :)
Monday, September 9th 2002 - 07:31:24 PM
what your parents call you: That loser son of mine.
what planet are you from??: Xinxatroxis
so i can reach you: there
Homepage URL: http://www.clinbrohf.netfirms.com
where am I???: magiclly appeared
whats a guestbook without a comment???:Nice little website, Maggie. I enjoyed visiting.
Friday, September 6th 2002 - 08:04:53 PM
what your parents call you: <asv>
what planet are you from??: <asv>
so i can reach you: <asv>
Homepage URL: http://<asv>
where am I???: word of mouth
whats a guestbook without a comment???:<asv>
Thursday, September 5th 2002 - 01:24:06 AM
what your parents call you: Brittany
what planet are you from??: Earth
so i can reach you: www.wintergoddess456@aol.com
where am I???: accidents do happen
whats a guestbook without a comment???:This is stupid!!!
Sunday, September 1st 2002 - 03:16:08 PM
what your parents call you: geo
what planet are you from??: geo
so i can reach you: geo
where am I???: magiclly appeared
whats a guestbook without a comment???:. Server B initiates the connection
and the transfer proceeds. The command-reply sequence is listed
below where the messages are vertically synchronous but
horizontally asynchronous:













Postel & Reynolds [Page 44]




RFC 959 October 1985
File Transfer Protocol


User-PI - Server A User-PI - Server B
------------------ ------------------

C->A : Connect C->B : Connect
C->A : PASV
A->C : 227 Entering Passive Mode. A1,A2,A3,A4,a1,a2
C->B : PORT A1,A2,A3,A4,a1,a2
B->C : 200 Okay
C->A : STOR C->B : RETR
B->A : Connect to HOST-A, PORT-a

Figure 3

The data connection shall be closed by the server under the
conditions described in the Section on Establishing Data
Connections. If the data connection is to be closed following a
data transfer where closing the connection is not required to
indicate the end-of-file, the server must do so immediately.
Waiting until after a new transfer command is not permitted
because the user-process will have already tested the data
connection to see if it needs to do a "listen"; (remember that the
user must "listen" on a closed data port BEFORE sending the
transfer request). To prevent a race condition here, the server
sends a reply (226) after closing the data connection (or if the
connection is left open, a "file transfer completed" reply (250)
and the user-PI should wait for one of these replies before
issuing a new transfer command).

Any time either the user or server see that the connection is
being closed by the other side, it should promptly read any
remaining data queued on the connection and issue the close on its
own side.

5.3. COMMANDS

The commands are Telnet character strings transmitted over the
control connections as described in the Section on FTP Commands.
The command functions and semantics are described in the Section
on Access Control Commands, Transfer Parameter Commands, FTP
Service Commands, and Miscellaneous Commands. The command syntax
is specified here.

The commands begin with a command code followed by an argument
field. The command codes are four or fewer alphabetic characters.
Upper and lower case alphabetic characters are to be treated
identically. Thus, any of the following may represent the
retrieve command:


Postel & Reynolds [Page 45]




RFC 959 October 1985
File Transfer Protocol


RETR Retr retr ReTr rETr

This also applies to any symbols representing parameter values,
such as A or a for ASCII TYPE. The command codes and the argument
fields are separated by one or more spaces.

The argument field consists of a variable length character string
ending with the character sequence <CRLF> (Carriage Return, Line
Feed) for NVT-ASCII representation; for other negotiated languages
a different end of line character might be used. It should be
noted that the server is to take no action until the end of line
code is received.

The syntax is specified below in NVT-ASCII. All characters in the
argument field are ASCII characters including any ASCII
represented decimal integers. Square brackets denote an optional
argument field. If the option is not taken, the appropriate
default is implied.































Postel & Reynolds [Page 46]




RFC 959 October 1985
File Transfer Protocol


5.3.1. FTP COMMANDS

The following are the FTP commands:

USER <SP> <username> <CRLF>
PASS <SP> <password> <CRLF>
ACCT <SP> <account-information> <CRLF>
CWD <SP> <pathname> <CRLF>
CDUP <CRLF>
SMNT <SP> <pathname> <CRLF>
QUIT <CRLF>
REIN <CRLF>
PORT <SP> <host-port> <CRLF>
PASV <CRLF>
TYPE <SP> <type-code> <CRLF>
STRU <SP> <structure-code> <CRLF>
MODE <SP> <mode-code> <CRLF>
RETR <SP> <pathname> <CRLF>
STOR <SP> <pathname> <CRLF>
STOU <CRLF>
APPE <SP> <pathname> <CRLF>
ALLO <SP> <decimal-integer>
[<SP> R <SP> <decimal-integer>] <CRLF>
REST <SP> <marker> <CRLF>
RNFR <SP> <pathname> <CRLF>
RNTO <SP> <pathname> <CRLF>
ABOR <CRLF>
DELE <SP> <pathname> <CRLF>
RMD <SP> <pathname> <CRLF>
MKD <SP> <pathname> <CRLF>
PWD <CRLF>
LIST [<SP> <pathname>] <CRLF>
NLST [<SP> <pathname>] <CRLF>
SITE <SP> <string> <CRLF>
SYST <CRLF>
STAT [<SP> <pathname>] <CRLF>
HELP [<SP> <string>] <CRLF>
NOOP <CRLF>











Postel & Reynolds [Page 47]




RFC 959 October 1985
File Transfer Protocol


5.3.2. FTP COMMAND ARGUMENTS

The syntax of the above argument fields (using BNF notation
where applicable) is:

<username> ::= <string>
<password> ::= <string>
<account-information> ::= <string>
<string> ::= <char> | <char><string>
<char> ::= any of the 128 ASCII characters except <CR> and
<LF>
<marker> ::= <pr-string>
<pr-string> ::= <pr-char> | <pr-char><pr-string>
<pr-char> ::= printable characters, any
ASCII code 33 through 126
<byte-size> ::= <number>
<host-port> ::= <host-number>,<port-number>
<host-number> ::= <number>,<number>,<number>,<number>
<port-number> ::= <number>,<number>
<number> ::= any decimal integer 1 through 255
<form-code> ::= N | T | C
<type-code> ::= A [<sp> <form-code>]
| E [<sp> <form-code>]
| I
| L <sp> <byte-size>
<structure-code> ::= F | R | P
<mode-code> ::= S | B | C
<pathname> ::= <string>
<decimal-integer> ::= any decimal integer




















Postel & Reynolds [Page 48]




RFC 959 October 1985
File Transfer Protocol


5.4. SEQUENCING OF COMMANDS AND REPLIES

The communication between the user and server is intended to be an
alternating dialogue. As such, the user issues an FTP command and
the server responds with a prompt primary reply. The user should
wait for this initial primary success or failure response before
sending further commands.

Certain commands require a second reply for which the user should
also wait. These replies may, for example, report on the progress
or completion of file transfer or the closing of the data
connection. They are secondary replies to file transfer commands.

One important group of informational replies is the connection
greetings. Under normal circumstances, a server will send a 220
reply, "awaiting input", when the connection is completed. The
user should wait for this greeting message before sending any
commands. If the server is unable to accept input right away, a
120 "expected delay" reply should be sent immediately and a 220
reply when ready. The user will then know not to hang up if there
is a delay.

Spontaneous Replies

Sometimes "the system" spontaneously has a message to be sent
to a user (usually all users). For example, "System going down
in 15 minutes". There is no provision in FTP for such
spontaneous information to be sent from the server to the user.
It is recommended that such information be queued in the
server-PI and delivered to the user-PI in the next reply
(possibly making it a multi-line reply).

The table below lists alternative success and failure replies for
each command. These must be strictly adhered to; a server may
substitute text in the replies, but the meaning and action implied
by the code numbers and by the specific command reply sequence
cannot be altered.

Command-Reply Sequences

In this section, the command-reply sequence is presented. Each
command is listed with its possible replies; command groups are
listed together. Preliminary replies are listed first (with
their succeeding replies indented and under them), then
positive and negative completion, and finally intermediary




Postel & Reynolds [Page 49]




RFC 959 October 1985
File Transfer Protocol


replies with the remaining commands from the sequence
following. This listing forms the basis for the state
diagrams, which will be presented separately.

Connection Establishment
120
220
220
421
Login
USER
230
530
500, 501, 421
331, 332
PASS
230
202
530
500, 501, 503, 421
332
ACCT
230
202
530
500, 501, 503, 421
CWD
250
500, 501, 502, 421, 530, 550
CDUP
200
500, 501, 502, 421, 530, 550
SMNT
202, 250
500, 501, 502, 421, 530, 550
Logout
REIN
120
220
220
421
500, 502
QUIT
221
500




Postel & Reynolds [Page 50]




RFC 959 October 1985
File Transfer Protocol


Transfer parameters
PORT
200
500, 501, 421, 530
PASV
227
500, 501, 502, 421, 530
MODE
200
500, 501, 504, 421, 530
TYPE
200
500, 501, 504, 421, 530
STRU
200
500, 501, 504, 421, 530
File action commands
ALLO
200
202
500, 501, 504, 421, 530
REST
500, 501, 502, 421, 530
350
STOR
125, 150
(110)
226, 250
425, 426, 451, 551, 552
532, 450, 452, 553
500, 501, 421, 530
STOU
125, 150
(110)
226, 250
425, 426, 451, 551, 552
532, 450, 452, 553
500, 501, 421, 530
RETR
125, 150
(110)
226, 250
425, 426, 451
450, 550
500, 501, 421, 530




Postel & Reynolds [Page 51]




RFC 959 October 1985
File Transfer Protocol


LIST
125, 150
226, 250
425, 426, 451
450
500, 501, 502, 421, 530
NLST
125, 150
226, 250
425, 426, 451
450
500, 501, 502, 421, 530
APPE
125, 150
(110)
226, 250
425, 426, 451, 551, 552
532, 450, 550, 452, 553
500, 501, 502, 421, 530
RNFR
450, 550
500, 501, 502, 421, 530
350
RNTO
250
532, 553
500, 501, 502, 503, 421, 530
DELE
250
450, 550
500, 501, 502, 421, 530
RMD
250
500, 501, 502, 421, 530, 550
MKD
257
500, 501, 502, 421, 530, 550
PWD
257
500, 501, 502, 421, 550
ABOR
225, 226
500, 501, 502, 421






Postel & Reynolds [Page 52]




RFC 959 October 1985
File Transfer Protocol


Informational commands
SYST
215
500, 501, 502, 421
STAT
211, 212, 213
450
500, 501, 502, 421, 530
HELP
211, 214
500, 501, 502, 421
Miscellaneous commands
SITE
200
202
500, 501, 530
NOOP
200
500 421






























Postel & Reynolds [Page 53]




RFC 959 October 1985
File Transfer Protocol


6. STATE DIAGRAMS

Here we present state diagrams for a very simple minded FTP
implementation. Only the first digit of the reply codes is used.
There is one state diagram for each group of FTP commands or command
sequences.

The command groupings were determined by constructing a model for
each command then collecting together the commands with structurally
identical models.

For each command or command sequence there are three possible
outcomes: success (S), failure (F), and error (E). In the state
diagrams below we use the symbol B for "begin", and the symbol W for
"wait for reply".

We first present the diagram that represents the largest group of FTP
commands:


1,3 +---+
----------->| E |
| +---+
|
+---+ cmd +---+ 2 +---+
| B |---------->| W |---------->| S |
+---+ +---+ +---+
|
| 4,5 +---+
----------->| F |
+---+


This diagram models the commands:

ABOR, ALLO, DELE, CWD, CDUP, SMNT, HELP, MODE, NOOP, PASV,
QUIT, SITE, PORT, SYST, STAT, RMD, MKD, PWD, STRU, and TYPE.












Postel & Reynolds [Page 54]

Wednesday, August 28th 2002 - 02:29:53 PM
what your parents call you: geo
what planet are you from??: geo
so i can reach you: geo
where am I???: magiclly appeared
whats a guestbook without a comment???:RFC 959 October 1985
File Transfer Protocol


commands, shall always be sent over the data connection, except
for certain informative replies. The following commands
specify FTP service requests:

RETRIEVE (RETR)

This command causes the server-DTP to transfer a copy of the
file, specified in the pathname, to the server- or user-DTP
at the other end of the data connection. The status and
contents of the file at the server site shall be unaffected.

STORE (STOR)

This command causes the server-DTP to accept the data
transferred via the data connection and to store the data as
a file at the server site. If the file specified in the
pathname exists at the server site, then its contents shall
be replaced by the data being transferred. A new file is
created at the server site if the file specified in the
pathname does not already exist.

STORE UNIQUE (STOU)

This command behaves like STOR except that the resultant
file is to be created in the current directory under a name
unique to that directory. The 250 Transfer Started response
must include the name generated.

APPEND (with create) (APPE)

This command causes the server-DTP to accept the data
transferred via the data connection and to store the data in
a file at the server site. If the file specified in the
pathname exists at the server site, then the data shall be
appended to that file; otherwise the file specified in the
pathname shall be created at the server site.

ALLOCATE (ALLO)

This command may be required by some servers to reserve
sufficient storage to accommodate the new file to be
transferred. The argument shall be a decimal integer
representing the number of bytes (using the logical byte
size) of storage to be reserved for the file. For files
sent with record or page structure a maximum record or page
size (in logical bytes) might also be necessary; this is
indicated by a decimal integer in a second argument field of


Postel & Reynolds [Page 30]




RFC 959 October 1985
File Transfer Protocol


the command. This second argument is optional, but when
present should be separated from the first by the three
Telnet characters <SP> R <SP>. This command shall be
followed by a STORe or APPEnd command. The ALLO command
should be treated as a NOOP (no operation) by those servers
which do not require that the maximum size of the file be
declared beforehand, and those servers interested in only
the maximum record or page size should accept a dummy value
in the first argument and ignore it.

RESTART (REST)

The argument field represents the server marker at which
file transfer is to be restarted. This command does not
cause file transfer but skips over the file to the specified
data checkpoint. This command shall be immediately followed
by the appropriate FTP service command which shall cause
file transfer to resume.

RENAME FROM (RNFR)

This command specifies the old pathname of the file which is
to be renamed. This command must be immediately followed by
a "rename to" command specifying the new file pathname.

RENAME TO (RNTO)

This command specifies the new pathname of the file
specified in the immediately preceding "rename from"
command. Together the two commands cause a file to be
renamed.

ABORT (ABOR)

This command tells the server to abort the previous FTP
service command and any associated transfer of data. The
abort command may require "special action", as discussed in
the Section on FTP Commands, to force recognition by the
server. No action is to be taken if the previous command
has been completed (including data transfer). The control
connection is not to be closed by the server, but the data
connection must be closed.

There are two cases for the server upon receipt of this
command: (1) the FTP service command was already completed,
or (2) the FTP service command is still in progress.



Postel & Reynolds [Page 31]




RFC 959 October 1985
File Transfer Protocol


In the first case, the server closes the data connection
(if it is open) and responds with a 226 reply, indicating
that the abort command was successfully processed.

In the second case, the server aborts the FTP service in
progress and closes the data connection, returning a 426
reply to indicate that the service request terminated
abnormally. The server then sends a 226 reply,
indicating that the abort command was successfully
processed.

DELETE (DELE)

This command causes the file specified in the pathname to be
deleted at the server site. If an extra level of protection
is desired (such as the query, "Do you really wish to
delete?"), it should be provided by the user-FTP process.

REMOVE DIRECTORY (RMD)

This command causes the directory specified in the pathname
to be removed as a directory (if the pathname is absolute)
or as a subdirectory of the current working directory (if
the pathname is relative). See Appendix II.

MAKE DIRECTORY (MKD)

This command causes the directory specified in the pathname
to be created as a directory (if the pathname is absolute)
or as a subdirectory of the current working directory (if
the pathname is relative). See Appendix II.

PRINT WORKING DIRECTORY (PWD)

This command causes the name of the current working
directory to be returned in the reply. See Appendix II.

LIST (LIST)

This command causes a list to be sent from the server to the
passive DTP. If the pathname specifies a directory or other
group of files, the server should transfer a list of files
in the specified directory. If the pathname specifies a
file then the server should send current information on the
file. A null argument implies the user's current working or
default directory. The data transfer is over the data
connection in type ASCII or type EBCDIC. (The user must


Postel & Reynolds [Page 32]




RFC 959 October 1985
File Transfer Protocol


ensure that the TYPE is appropriately ASCII or EBCDIC).
Since the information on a file may vary widely from system
to system, this information may be hard to use automatically
in a program, but may be quite useful to a human user.

NAME LIST (NLST)

This command causes a directory listing to be sent from
server to user site. The pathname should specify a
directory or other system-specific file group descriptor; a
null argument implies the current directory. The server
will return a stream of names of files and no other
information. The data will be transferred in ASCII or
EBCDIC type over the data connection as valid pathname
strings separated by <CRLF> or <NL>. (Again the user must
ensure that the TYPE is correct.) This command is intended
to return information that can be used by a program to
further process the files automatically. For example, in
the implementation of a "multiple get" function.

SITE PARAMETERS (SITE)

This command is used by the server to provide services
specific to his system that are essential to file transfer
but not sufficiently universal to be included as commands in
the protocol. The nature of these services and the
specification of their syntax can be stated in a reply to
the HELP SITE command.

SYSTEM (SYST)

This command is used to find out the type of operating
system at the server. The reply shall have as its first
word one of the system names listed in the current version
of the Assigned Numbers document [4].

STATUS (STAT)

This command shall cause a status response to be sent over
the control connection in the form of a reply. The command
may be sent during a file transfer (along with the Telnet IP
and Synch signals--see the Section on FTP Commands) in which
case the server will respond with the status of the
operation in progress, or it may be sent between file
transfers. In the latter case, the command may have an
argument field. If the argument is a pathname, the command
is analogous to the "list" command except that data shall be


Postel & Reynolds [Page 33]




RFC 959 October 1985
File Transfer Protocol


transferred over the control connection. If a partial
pathname is given, the server may respond with a list of
file names or attributes associated with that specification.
If no argument is given, the server should return general
status information about the server FTP process. This
should include current values of all transfer parameters and
the status of connections.

HELP (HELP)

This command shall cause the server to send helpful
information regarding its implementation status over the
control connection to the user. The command may take an
argument (e.g., any command name) and return more specific
information as a response. The reply is type 211 or 214.
It is suggested that HELP be allowed before entering a USER
command. The server may use this reply to specify
site-dependent parameters, e.g., in response to HELP SITE.

NOOP (NOOP)

This command does not affect any parameters or previously
entered commands. It specifies no action other than that the
server send an OK reply.

The File Transfer Protocol follows the specifications of the Telnet
protocol for all communications over the control connection. Since
the language used for Telnet communication may be a negotiated
option, all references in the next two sections will be to the
"Telnet language" and the corresponding "Telnet end-of-line code".
Currently, one may take these to mean NVT-ASCII and <CRLF>. No other
specifications of the Telnet protocol will be cited.

FTP commands are "Telnet strings" terminated by the "Telnet end of
line code". The command codes themselves are alphabetic characters
terminated by the character <SP> (Space) if parameters follow and
Telnet-EOL otherwise. The command codes and the semantics of
commands are described in this section; the detailed syntax of
commands is specified in the Section on Commands, the reply sequences
are discussed in the Section on Sequencing of Commands and Replies,
and scenarios illustrating the use of commands are provided in the
Section on Typical FTP Scenarios.

FTP commands may be partitioned as those specifying access-control
identifiers, data transfer parameters, or FTP service requests.
Certain commands (such as ABOR, STAT, QUIT) may be sent over the
control connection while a data transfer is in progress. Some


Postel & Reynolds [Page 34]




RFC 959 October 1985
File Transfer Protocol


servers may not be able to monitor the control and data connections
simultaneously, in which case some special action will be necessary
to get the server's attention. The following ordered format is
tentatively recommended:

1. User system inserts the Telnet "Interrupt Process" (IP) signal
in the Telnet stream.

2. User system sends the Telnet "Synch" signal.

3. User system inserts the command (e.g., ABOR) in the Telnet
stream.

4. Server PI, after receiving "IP", scans the Telnet stream for
EXACTLY ONE FTP command.

(For other servers this may not be necessary but the actions listed
above should have no unusual effect.)

4.2. FTP REPLIES

Replies to File Transfer Protocol commands are devised to ensure
the synchronization of requests and actions in the process of file
transfer, and to guarantee that the user process always knows the
state of the Server. Every command must generate at least one
reply, although there may be more than one; in the latter case,
the multiple replies must be easily distinguished. In addition,
some commands occur in sequential groups, such as USER, PASS and
ACCT, or RNFR and RNTO. The replies show the existence of an
intermediate state if all preceding commands have been successful.
A failure at any point in the sequence necessitates the repetition
of the entire sequence from the beginning.

The details of the command-reply sequence are made explicit in
a set of state diagrams below.

An FTP reply consists of a three digit number (transmitted as
three alphanumeric characters) followed by some text. The number
is intended for use by automata to determine what state to enter
next; the text is intended for the human user. It is intended
that the three digits contain enough encoded information that the
user-process (the User-PI) will not need to examine the text and
may either discard it or pass it on to the user, as appropriate.
In particular, the text may be server-dependent, so there are
likely to be varying texts for each reply code.

A reply is defined to contain the 3-digit code, followed by Space


Postel & Reynolds [Page 35]




RFC 959 October 1985
File Transfer Protocol


<SP>, followed by one line of text (where some maximum line length
has been specified), and terminated by the Telnet end-of-line
code. There will be cases however, where the text is longer than
a single line. In these cases the complete text must be bracketed
so the User-process knows when it may stop reading the reply (i.e.
stop processing input on the control connection) and go do other
things. This requires a special format on the first line to
indicate that more than one line is coming, and another on the
last line to designate it as the last. At least one of these must
contain the appropriate reply code to indicate the state of the
transaction. To satisfy all factions, it was decided that both
the first and last line codes should be the same.

Thus the format for multi-line replies is that the first line
will begin with the exact required reply code, followed
immediately by a Hyphen, "-" (also known as Minus), followed by
text. The last line will begin with the same code, followed
immediately by Space <SP>, optionally some text, and the Telnet
end-of-line code.

For example:
123-First line
Second line
234 A line beginning with numbers
123 The last line

The user-process then simply needs to search for the second
occurrence of the same reply code, followed by <SP> (Space), at
the beginning of a line, and ignore all intermediary lines. If
an intermediary line begins with a 3-digit number, the Server
must pad the front to avoid confusion.

This scheme allows standard system routines to be used for
reply information (such as for the STAT reply), with
"artificial" first and last lines tacked on. In rare cases
where these routines are able to generate three digits and a
Space at the beginning of any line, the beginning of each
text line should be offset by some neutral text, like Space.

This scheme assumes that multi-line replies may not be nested.

The three digits of the reply each have a special significance.
This is intended to allow a range of very simple to very
sophisticated responses by the user-process. The first digit
denotes whether the response is good, bad or incomplete.
(Referring to the state diagram), an unsophisticated user-process
will be able to determine its next action (proceed as planned,


Postel & Reynolds [Page 36]




RFC 959 October 1985
File Transfer Protocol


redo, retrench, etc.) by simply examining this first digit. A
user-process that wants to know approximately what kind of error
occurred (e.g. file system error, command syntax error) may
examine the second digit, reserving the third digit for the finest
gradation of information (e.g., RNTO command without a preceding
RNFR).

There are five values for the first digit of the reply code:

1yz Positive Preliminary reply

The requested action is being initiated; expect another
reply before proceeding with a new command. (The
user-process sending another command before the
completion reply would be in violation of protocol; but
server-FTP processes should queue any commands that
arrive while a preceding command is in progress.) This
type of reply can be used to indicate that the command
was accepted and the user-process may now pay attention
to the data connections, for implementations where
simultaneous monitoring is difficult. The server-FTP
process may send at most, one 1yz reply per command.

2yz Positive Completion reply

The requested action has been successfully completed. A
new request may be initiated.

3yz Positive Intermediate reply

The command has been accepted, but the requested action
is being held in abeyance, pending receipt of further
information. The user should send another command
specifying this information. This reply is used in
command sequence groups.

4yz Transient Negative Completion reply

The command was not accepted and the requested action did
not take place, but the error condition is temporary and
the action may be requested again. The user should
return to the beginning of the command sequence, if any.
It is difficult to assign a meaning to "transient",
particularly when two distinct sites (Server- and
User-processes) have to agree on the interpretation.
Each reply in the 4yz category might have a slightly
different time value, but the intent is that the


Postel & Reynolds [Page 37]




RFC 959 October 1985
File Transfer Protocol


user-process is encouraged to try again. A rule of thumb
in determining if a reply fits into the 4yz or the 5yz
(Permanent Negative) category is that replies are 4yz if
the commands can be repeated without any change in
command form or in properties of the User or Server
(e.g., the command is spelled the same with the same
arguments used; the user does not change his file access
or user name; the server does not put up a new
implementation.)

5yz Permanent Negative Completion reply

The command was not accepted and the requested action did
not take place. The User-process is discouraged from
repeating the exact request (in the same sequence). Even
some "permanent" error conditions can be corrected, so
the human user may want to direct his User-process to
reinitiate the command sequence by direct action at some
point in the future (e.g., after the spelling has been
changed, or the user has altered his directory status.)

The following function groupings are encoded in the second
digit:

x0z Syntax - These replies refer to syntax errors,
syntactically correct commands that don't fit any
functional category, unimplemented or superfluous
commands.

x1z Information - These are replies to requests for
information, such as status or help.

x2z Connections - Replies referring to the control and
data connections.

x3z Authentication and accounting - Replies for the login
process and accounting procedures.

x4z Unspecified as yet.

x5z File system - These replies indicate the status of the
Server file system vis-a-vis the requested transfer or
other file system action.

The third digit gives a finer gradation of meaning in each of
the function categories, specified by the second digit. The
list of replies below will illustrate this. Note that the text


Postel & Reynolds [Page 38]




RFC 959 October 1985
File Transfer Protocol


associated with each reply is recommended, rather than
mandatory, and may even change according to the command with
which it is associated. The reply codes, on the other hand,
must strictly follow the specifications in the last section;
that is, Server implementations should not invent new codes for
situations that are only slightly different from the ones
described here, but rather should adapt codes already defined.

A command such as TYPE or ALLO whose successful execution
does not offer the user-process any new information will
cause a 200 reply to be returned. If the command is not
implemented by a particular Server-FTP process because it
has no relevance to that computer system, for example ALLO
at a TOPS20 site, a Positive Completion reply is still
desired so that the simple User-process knows it can proceed
with its course of action. A 202 reply is used in this case
with, for example, the reply text: "No storage allocation
necessary." If, on the other hand, the command requests a
non-site-specific action and is unimplemented, the response
is 502. A refinement of that is the 504 reply for a command
that is implemented, but that requests an unimplemented
parameter.

4.2.1 Reply Codes by Function Groups

200 Command okay.
500 Syntax error, command unrecognized.
This may include errors such as command line too long.
501 Syntax error in parameters or arguments.
202 Command not implemented, superfluous at this site.
502 Command not implemented.
503 Bad sequence of commands.
504 Command not implemented for that parameter.
















Postel & Reynolds [Page 39]




RFC 959 October 1985
File Transfer Protocol


110 Restart marker reply.
In this case, the text is exact and not left to the
particular implementation; it must read:
MARK yyyy = mmmm
Where yyyy is User-process data stream marker, and mmmm
server's equivalent marker (note the spaces between markers
and "=").
211 System status, or system help reply.
212 Directory status.
213 File status.
214 Help message.
On how to use the server or the meaning of a particular
non-standard command. This reply is useful only to the
human user.
215 NAME system type.
Where NAME is an official system name from the list in the
Assigned Numbers document.

120 Service ready in nnn minutes.
220 Service ready for new user.
221 Service closing control connection.
Logged out if appropriate.
421 Service not available, closing control connection.
This may be a reply to any command if the service knows it
must shut down.
125 Data connection already open; transfer starting.
225 Data connection open; no transfer in progress.
425 Can't open data connection.
226 Closing data connection.
Requested file action successful (for example, file
transfer or file abort).
426 Connection closed; transfer aborted.
227 Entering Passive Mode (h1,h2,h3,h4,p1,p2).

230 User logged in, proceed.
530 Not logged in.
331 User name okay, need password.
332 Need account for login.
532 Need account for storing files.










Postel & Reynolds [Page 40]




RFC 959 October 1985
File Transfer Protocol


150 File status okay; about to open data connection.
250 Requested file action okay, completed.
257 "PATHNAME" created.
350 Requested file action pending further information.
450 Requested file action not taken.
File unavailable (e.g., file busy).
550 Requested action not taken.
File unavailable (e.g., file not found, no access).
451 Requested action aborted. Local error in processing.
551 Requested action aborted. Page type unknown.
452 Requested action not taken.
Insufficient storage space in system.
552 Requested file action aborted.
Exceeded storage allocation (for current directory or
dataset).
553 Requested action not taken.
File name not allowed.


4.2.2 Numeric Order List of Reply Codes

110 Restart marker reply.
In this case, the text is exact and not left to the
particular implementation; it must read:
MARK yyyy = mmmm
Where yyyy is User-process data stream marker, and mmmm
server's equivalent marker (note the spaces between markers
and "=").
120 Service ready in nnn minutes.
125 Data connection already open; transfer starting.
150 File status okay; about to open data connection.


















Postel & Reynolds [Page 41]




RFC 959 October 1985
File Transfer Protocol


200 Command okay.
202 Command not implemented, superfluous at this site.
211 System status, or system help reply.
212 Directory status.
213 File status.
214 Help message.
On how to use the server or the meaning of a particular
non-standard command. This reply is useful only to the
human user.
215 NAME system type.
Where NAME is an official system name from the list in the
Assigned Numbers document.
220 Service ready for new user.
221 Service closing control connection.
Logged out if appropriate.
225 Data connection open; no transfer in progress.
226 Closing data connection.
Requested file action successful (for example, file
transfer or file abort).
227 Entering Passive Mode (h1,h2,h3,h4,p1,p2).
230 User logged in, proceed.
250 Requested file action okay, completed.
257 "PATHNAME" created.

331 User name okay, need password.
332 Need account for login.
350 Requested file action pending further information.

421 Service not available, closing control connection.
This may be a reply to any command if the service knows it
must shut down.
425 Can't open data connection.
426 Connection closed; transfer aborted.
450 Requested file action not taken.
File unavailable (e.g., file busy).
451 Requested action aborted: local error in processing.
452 Requested action not taken.
Insufficient storage space in system.











Postel & Reynolds [Page 42]




RFC 959 October 1985
File Transfer Protocol


500 Syntax error, command unrecognized.
This may include errors such as command line too long.
501 Syntax error in parameters or arguments.
502 Command not implemented.
503 Bad sequence of commands.
504 Command not implemented for that parameter.
530 Not logged in.
532 Need account for storing files.
550 Requested action not taken.
File unavailable (e.g., file not found, no access).
551 Requested action aborted: page type unknown.
552 Requested file action aborted.
Exceeded storage allocation (for current directory or
dataset).
553 Requested action not taken.
File name not allowed.


5. DECLARATIVE SPECIFICATIONS

5.1. MINIMUM IMPLEMENTATION

In order to make FTP workable without needless error messages, the
following minimum implementation is required for all servers:

TYPE - ASCII Non-print
MODE - Stream
STRUCTURE - File, Record
COMMANDS - USER, QUIT, PORT,
TYPE, MODE, STRU,
for the default values
RETR, STOR,
NOOP.

The default values for transfer parameters are:

TYPE - ASCII Non-print
MODE - Stream
STRU - File

All hosts must accept the above as the standard defaults.








Postel & Reynolds [Page 43]




RFC 959 October 1985
File Transfer Protocol


5.2. CONNECTIONS

The server protocol interpreter shall "listen" on Port L. The
user or user protocol interpreter shall initiate the full-duplex
control connection. Server- and user- processes should follow the
conventions of the Telnet protocol as specified in the
ARPA-Internet Protocol Handbook [1]. Servers are under no
obligation to provide for editing of command lines and may require
that it be done in the user host. The control connection shall be
closed by the server at the user's request after all transfers and
replies are completed.

The user-DTP must "listen" on the specified data port; this may be
the default user port (U) or a port specified in the PORT command.
The server shall initiate the data connection from his own default
data port (L-1) using the specified user data port. The direction
of the transfer and the port used will be determined by the FTP
service command.

Note that all FTP implementation must support data transfer using
the default port, and that only the USER-PI may initiate the use
of non-default ports.

When data is to be transferred between two servers, A and B (refer
to Figure 2), the user-PI, C, sets up control connections with
both server-PI's. One of the servers, say A, is then sent a PASV
command telling him to "listen" on his data port rather than
initiate a connection when he receives a transfer service command.
When the user-PI receives an acknowledgment to the PASV command,
which includes the identity of the host and port being listened
on, the user-PI then sends A's port, a, to B in a PORT command; a
reply is returned. The user-PI may then send the corresponding
service commands to A and B. Server
Wednesday, August 28th 2002 - 02:24:25 PM
what your parents call you: geo
what planet are you from??: geo
so i can reach you: geo
where am I???: magiclly appeared
whats a guestbook without a comment???:RFC 959 October 1985
File Transfer Protocol


<CRLF> for ASCII, or <NL> for EBCDIC text files, as the
delimiter. If an FTP implementation adopts this technique, it
must be prepared to reverse the transformation if the file is
retrieved with file-structure.

3.1.2.1. FILE STRUCTURE

File structure is the default to be assumed if the STRUcture
command has not been used.

In file-structure there is no internal structure and the
file is considered to be a continuous sequence of data
bytes.

3.1.2.2. RECORD STRUCTURE

Record structures must be accepted for "text" files (i.e.,
files with TYPE ASCII or EBCDIC) by all FTP implementations.

In record-structure the file is made up of sequential
records.

3.1.2.3. PAGE STRUCTURE

To transmit files that are discontinuous, FTP defines a page
structure. Files of this type are sometimes known as
"random access files" or even as "holey files". In these
files there is sometimes other information associated with
the file as a whole (e.g., a file descriptor), or with a
section of the file (e.g., page access controls), or both.
In FTP, the sections of the file are called pages.

To provide for various page sizes and associated
information, each page is sent with a page header. The page
header has the following defined fields:

Header Length

The number of logical bytes in the page header
including this byte. The minimum header length is 4.

Page Index

The logical page number of this section of the file.
This is not the transmission sequence number of this
page, but the index used to identify this page of the
file.


Postel & Reynolds [Page 16]




RFC 959 October 1985
File Transfer Protocol


Data Length

The number of logical bytes in the page data. The
minimum data length is 0.

Page Type

The type of page this is. The following page types
are defined:

0 = Last Page

This is used to indicate the end of a paged
structured transmission. The header length must
be 4, and the data length must be 0.

1 = Simple Page

This is the normal type for simple paged files
with no page level associated control
information. The header length must be 4.

2 = Descriptor Page

This type is used to transmit the descriptive
information for the file as a whole.

3 = Access Controlled Page

This type includes an additional header field
for paged files with page level access control
information. The header length must be 5.

Optional Fields

Further header fields may be used to supply per page
control information, for example, per page access
control.

All fields are one logical byte in length. The logical byte
size is specified by the TYPE command. See Appendix I for
further details and a specific case at the page structure.

A note of caution about parameters: a file must be stored and
retrieved with the same parameters if the retrieved version is to




Postel & Reynolds [Page 17]




RFC 959 October 1985
File Transfer Protocol


be identical to the version originally transmitted. Conversely,
FTP implementations must return a file identical to the original
if the parameters used to store and retrieve a file are the same.

3.2. ESTABLISHING DATA CONNECTIONS

The mechanics of transferring data consists of setting up the data
connection to the appropriate ports and choosing the parameters
for transfer. Both the user and the server-DTPs have a default
data port. The user-process default data port is the same as the
control connection port (i.e., U). The server-process default
data port is the port adjacent to the control connection port
(i.e., L-1).

The transfer byte size is 8-bit bytes. This byte size is relevant
only for the actual transfer of the data; it has no bearing on
representation of the data within a host's file system.

The passive data transfer process (this may be a user-DTP or a
second server-DTP) shall "listen" on the data port prior to
sending a transfer request command. The FTP request command
determines the direction of the data transfer. The server, upon
receiving the transfer request, will initiate the data connection
to the port. When the connection is established, the data
transfer begins between DTP's, and the server-PI sends a
confirming reply to the user-PI.

Every FTP implementation must support the use of the default data
ports, and only the USER-PI can initiate a change to non-default
ports.

It is possible for the user to specify an alternate data port by
use of the PORT command. The user may want a file dumped on a TAC
line printer or retrieved from a third party host. In the latter
case, the user-PI sets up control connections with both
server-PI's. One server is then told (by an FTP command) to
"listen" for a connection which the other will initiate. The
user-PI sends one server-PI a PORT command indicating the data
port of the other. Finally, both are sent the appropriate
transfer commands. The exact sequence of commands and replies
sent between the user-controller and the servers is defined in the
Section on FTP Replies.

In general, it is the server's responsibility to maintain the data
connection--to initiate it and to close it. The exception to this




Postel & Reynolds [Page 18]




RFC 959 October 1985
File Transfer Protocol


is when the user-DTP is sending the data in a transfer mode that
requires the connection to be closed to indicate EOF. The server
MUST close the data connection under the following conditions:

1. The server has completed sending data in a transfer mode
that requires a close to indicate EOF.

2. The server receives an ABORT command from the user.

3. The port specification is changed by a command from the
user.

4. The control connection is closed legally or otherwise.

5. An irrecoverable error condition occurs.

Otherwise the close is a server option, the exercise of which the
server must indicate to the user-process by either a 250 or 226
reply only.

3.3. DATA CONNECTION MANAGEMENT

Default Data Connection Ports: All FTP implementations must
support use of the default data connection ports, and only the
User-PI may initiate the use of non-default ports.

Negotiating Non-Default Data Ports: The User-PI may specify a
non-default user side data port with the PORT command. The
User-PI may request the server side to identify a non-default
server side data port with the PASV command. Since a connection
is defined by the pair of addresses, either of these actions is
enough to get a different data connection, still it is permitted
to do both commands to use new ports on both ends of the data
connection.

Reuse of the Data Connection: When using the stream mode of data
transfer the end of the file must be indicated by closing the
connection. This causes a problem if multiple files are to be
transfered in the session, due to need for TCP to hold the
connection record for a time out period to guarantee the reliable
communication. Thus the connection can not be reopened at once.

There are two solutions to this problem. The first is to
negotiate a non-default port. The second is to use another
transfer mode.

A comment on transfer modes. The stream transfer mode is


Postel & Reynolds [Page 19]




RFC 959 October 1985
File Transfer Protocol


inherently unreliable, since one can not determine if the
connection closed prematurely or not. The other transfer modes
(Block, Compressed) do not close the connection to indicate the
end of file. They have enough FTP encoding that the data
connection can be parsed to determine the end of the file.
Thus using these modes one can leave the data connection open
for multiple file transfers.

3.4. TRANSMISSION MODES

The next consideration in transferring data is choosing the
appropriate transmission mode. There are three modes: one which
formats the data and allows for restart procedures; one which also
compresses the data for efficient transfer; and one which passes
the data with little or no processing. In this last case the mode
interacts with the structure attribute to determine the type of
processing. In the compressed mode, the representation type
determines the filler byte.

All data transfers must be completed with an end-of-file (EOF)
which may be explicitly stated or implied by the closing of the
data connection. For files with record structure, all the
end-of-record markers (EOR) are explicit, including the final one.
For files transmitted in page structure a "last-page" page type is
used.

NOTE: In the rest of this section, byte means "transfer byte"
except where explicitly stated otherwise.

For the purpose of standardized transfer, the sending host will
translate its internal end of line or end of record denotation
into the representation prescribed by the transfer mode and file
structure, and the receiving host will perform the inverse
translation to its internal denotation. An IBM Mainframe record
count field may not be recognized at another host, so the
end-of-record information may be transferred as a two byte control
code in Stream mode or as a flagged bit in a Block or Compressed
mode descriptor. End-of-line in an ASCII or EBCDIC file with no
record structure should be indicated by <CRLF> or <NL>,
respectively. Since these transformations imply extra work for
some systems, identical systems transferring non-record structured
text files might wish to use a binary representation and stream
mode for the transfer.






Postel & Reynolds [Page 20]




RFC 959 October 1985
File Transfer Protocol


The following transmission modes are defined in FTP:

3.4.1. STREAM MODE

The data is transmitted as a stream of bytes. There is no
restriction on the representation type used; record structures
are allowed.

In a record structured file EOR and EOF will each be indicated
by a two-byte control code. The first byte of the control code
will be all ones, the escape character. The second byte will
have the low order bit on and zeros elsewhere for EOR and the
second low order bit on for EOF; that is, the byte will have
value 1 for EOR and value 2 for EOF. EOR and EOF may be
indicated together on the last byte transmitted by turning both
low order bits on (i.e., the value 3). If a byte of all ones
was intended to be sent as data, it should be repeated in the
second byte of the control code.

If the structure is a file structure, the EOF is indicated by
the sending host closing the data connection and all bytes are
data bytes.

3.4.2. BLOCK MODE

The file is transmitted as a series of data blocks preceded by
one or more header bytes. The header bytes contain a count
field, and descriptor code. The count field indicates the
total length of the data block in bytes, thus marking the
beginning of the next data block (there are no filler bits).
The descriptor code defines: last block in the file (EOF) last
block in the record (EOR), restart marker (see the Section on
Error Recovery and Restart) or suspect data (i.e., the data
being transferred is suspected of errors and is not reliable).
This last code is NOT intended for error control within FTP.
It is motivated by the desire of sites exchanging certain types
of data (e.g., seismic or weather data) to send and receive all
the data despite local errors (such as "magnetic tape read
errors"), but to indicate in the transmission that certain
portions are suspect). Record structures are allowed in this
mode, and any representation type may be used.

The header consists of the three bytes. Of the 24 bits of
header information, the 16 low order bits shall represent byte
count, and the 8 high order bits shall represent descriptor
codes as shown below.



Postel & Reynolds [Page 21]




RFC 959 October 1985
File Transfer Protocol


Block Header

+----------------+----------------+----------------+
| Descriptor | Byte Count |
| 8 bits | 16 bits |
+----------------+----------------+----------------+


The descriptor codes are indicated by bit flags in the
descriptor byte. Four codes have been assigned, where each
code number is the decimal value of the corresponding bit in
the byte.

Code Meaning

128 End of data block is EOR
64 End of data block is EOF
32 Suspected errors in data block
16 Data block is a restart marker

With this encoding, more than one descriptor coded condition
may exist for a particular block. As many bits as necessary
may be flagged.

The restart marker is embedded in the data stream as an
integral number of 8-bit bytes representing printable
characters in the language being used over the control
connection (e.g., default--NVT-ASCII). <SP> (Space, in the
appropriate language) must not be used WITHIN a restart marker.

For example, to transmit a six-character marker, the following
would be sent:

+--------+--------+--------+
|Descrptr| Byte count |
|code= 16| = 6 |
+--------+--------+--------+

+--------+--------+--------+
| Marker | Marker | Marker |
| 8 bits | 8 bits | 8 bits |
+--------+--------+--------+

+--------+--------+--------+
| Marker | Marker | Marker |
| 8 bits | 8 bits | 8 bits |
+--------+--------+--------+


Postel & Reynolds [Page 22]




RFC 959 October 1985
File Transfer Protocol


3.4.3. COMPRESSED MODE

There are three kinds of information to be sent: regular data,
sent in a byte string; compressed data, consisting of
replications or filler; and control information, sent in a
two-byte escape sequence. If n>0 bytes (up to 127) of regular
data are sent, these n bytes are preceded by a byte with the
left-most bit set to 0 and the right-most 7 bits containing the
number n.

Byte string:

1 7 8 8
+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
|0| n | | d(1) | ... | d(n) |
+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
^ ^
|---n bytes---|
of data

String of n data bytes d(1),..., d(n)
Count n must be positive.

To compress a string of n replications of the data byte d, the
following 2 bytes are sent:

Replicated Byte:

2 6 8
+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
|1 0| n | | d |
+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+

A string of n filler bytes can be compressed into a single
byte, where the filler byte varies with the representation
type. If the type is ASCII or EBCDIC the filler byte is <SP>
(Space, ASCII code 32, EBCDIC code 64). If the type is Image
or Local byte the filler is a zero byte.

Filler String:

2 6
+-+-+-+-+-+-+-+-+
|1 1| n |
+-+-+-+-+-+-+-+-+

The escape sequence is a double byte, the first of which is the


Postel & Reynolds [Page 23]




RFC 959 October 1985
File Transfer Protocol


escape byte (all zeros) and the second of which contains
descriptor codes as defined in Block mode. The descriptor
codes have the same meaning as in Block mode and apply to the
succeeding string of bytes.

Compressed mode is useful for obtaining increased bandwidth on
very large network transmissions at a little extra CPU cost.
It can be most effectively used to reduce the size of printer
files such as those generated by RJE hosts.

3.5. ERROR RECOVERY AND RESTART

There is no provision for detecting bits lost or scrambled in data
transfer; this level of error control is handled by the TCP.
However, a restart procedure is provided to protect users from
gross system failures (including failures of a host, an
FTP-process, or the underlying network).

The restart procedure is defined only for the block and compressed
modes of data transfer. It requires the sender of data to insert
a special marker code in the data stream with some marker
information. The marker information has meaning only to the
sender, but must consist of printable characters in the default or
negotiated language of the control connection (ASCII or EBCDIC).
The marker could represent a bit-count, a record-count, or any
other information by which a system may identify a data
checkpoint. The receiver of data, if it implements the restart
procedure, would then mark the corresponding position of this
marker in the receiving system, and return this information to the
user.

In the event of a system failure, the user can restart the data
transfer by identifying the marker point with the FTP restart
procedure. The following example illustrates the use of the
restart procedure.

The sender of the data inserts an appropriate marker block in the
data stream at a convenient point. The receiving host marks the
corresponding data point in its file system and conveys the last
known sender and receiver marker information to the user, either
directly or over the control connection in a 110 reply (depending
on who is the sender). In the event of a system failure, the user
or controller process restarts the server at the last server
marker by sending a restart command with server's marker code as
its argument. The restart command is transmitted over the control




Postel & Reynolds [Page 24]




RFC 959 October 1985
File Transfer Protocol


connection and is immediately followed by the command (such as
RETR, STOR or LIST) which was being executed when the system
failure occurred.

4. FILE TRANSFER FUNCTIONS

The communication channel from the user-PI to the server-PI is
established as a TCP connection from the user to the standard server
port. The user protocol interpreter is responsible for sending FTP
commands and interpreting the replies received; the server-PI
interprets commands, sends replies and directs its DTP to set up the
data connection and transfer the data. If the second party to the
data transfer (the passive transfer process) is the user-DTP, then it
is governed through the internal protocol of the user-FTP host; if it
is a second server-DTP, then it is governed by its PI on command from
the user-PI. The FTP replies are discussed in the next section. In
the description of a few of the commands in this section, it is
helpful to be explicit about the possible replies.

4.1. FTP COMMANDS

4.1.1. ACCESS CONTROL COMMANDS

The following commands specify access control identifiers
(command codes are shown in parentheses).

USER NAME (USER)

The argument field is a Telnet string identifying the user.
The user identification is that which is required by the
server for access to its file system. This command will
normally be the first command transmitted by the user after
the control connections are made (some servers may require
this). Additional identification information in the form of
a password and/or an account command may also be required by
some servers. Servers may allow a new USER command to be
entered at any point in order to change the access control
and/or accounting information. This has the effect of
flushing any user, password, and account information already
supplied and beginning the login sequence again. All
transfer parameters are unchanged and any file transfer in
progress is completed under the old access control
parameters.






Postel & Reynolds [Page 25]




RFC 959 October 1985
File Transfer Protocol


PASSWORD (PASS)

The argument field is a Telnet string specifying the user's
password. This command must be immediately preceded by the
user name command, and, for some sites, completes the user's
identification for access control. Since password
information is quite sensitive, it is desirable in general
to "mask" it or suppress typeout. It appears that the
server has no foolproof way to achieve this. It is
therefore the responsibility of the user-FTP process to hide
the sensitive password information.

ACCOUNT (ACCT)

The argument field is a Telnet string identifying the user's
account. The command is not necessarily related to the USER
command, as some sites may require an account for login and
others only for specific access, such as storing files. In
the latter case the command may arrive at any time.

There are reply codes to differentiate these cases for the
automation: when account information is required for login,
the response to a successful PASSword command is reply code
332. On the other hand, if account information is NOT
required for login, the reply to a successful PASSword
command is 230; and if the account information is needed for
a command issued later in the dialogue, the server should
return a 332 or 532 reply depending on whether it stores
(pending receipt of the ACCounT command) or discards the
command, respectively.

CHANGE WORKING DIRECTORY (CWD)

This command allows the user to work with a different
directory or dataset for file storage or retrieval without
altering his login or accounting information. Transfer
parameters are similarly unchanged. The argument is a
pathname specifying a directory or other system dependent
file group designator.

CHANGE TO PARENT DIRECTORY (CDUP)

This command is a special case of CWD, and is included to
simplify the implementation of programs for transferring
directory trees between operating systems having different




Postel & Reynolds [Page 26]




RFC 959 October 1985
File Transfer Protocol


syntaxes for naming the parent directory. The reply codes
shall be identical to the reply codes of CWD. See
Appendix II for further details.

STRUCTURE MOUNT (SMNT)

This command allows the user to mount a different file
system data structure without altering his login or
accounting information. Transfer parameters are similarly
unchanged. The argument is a pathname specifying a
directory or other system dependent file group designator.

REINITIALIZE (REIN)

This command terminates a USER, flushing all I/O and account
information, except to allow any transfer in progress to be
completed. All parameters are reset to the default settings
and the control connection is left open. This is identical
to the state in which a user finds himself immediately after
the control connection is opened. A USER command may be
expected to follow.

LOGOUT (QUIT)

This command terminates a USER and if file transfer is not
in progress, the server closes the control connection. If
file transfer is in progress, the connection will remain
open for result response and the server will then close it.
If the user-process is transferring files for several USERs
but does not wish to close and then reopen connections for
each, then the REIN command should be used instead of QUIT.

An unexpected close on the control connection will cause the
server to take the effective action of an abort (ABOR) and a
logout (QUIT).

4.1.2. TRANSFER PARAMETER COMMANDS

All data transfer parameters have default values, and the
commands specifying data transfer parameters are required only
if the default parameter values are to be changed. The default
value is the last specified value, or if no value has been
specified, the standard default value is as stated here. This
implies that the server must "remember" the applicable default
values. The commands may be in any order except that they must
precede the FTP service request. The following commands
specify data transfer parameters:


Postel & Reynolds [Page 27]




RFC 959 October 1985
File Transfer Protocol


DATA PORT (PORT)

The argument is a HOST-PORT specification for the data port
to be used in data connection. There are defaults for both
the user and server data ports, and under normal
circumstances this command and its reply are not needed. If
this command is used, the argument is the concatenation of a
32-bit internet host address and a 16-bit TCP port address.
This address information is broken into 8-bit fields and the
value of each field is transmitted as a decimal number (in
character string representation). The fields are separated
by commas. A port command would be:

PORT h1,h2,h3,h4,p1,p2

where h1 is the high order 8 bits of the internet host
address.

PASSIVE (PASV)

This command requests the server-DTP to "listen" on a data
port (which is not its default data port) and to wait for a
connection rather than initiate one upon receipt of a
transfer command. The response to this command includes the
host and port address this server is listening on.

REPRESENTATION TYPE (TYPE)

The argument specifies the representation type as described
in the Section on Data Representation and Storage. Several
types take a second parameter. The first parameter is
denoted by a single Telnet character, as is the second
Format parameter for ASCII and EBCDIC; the second parameter
for local byte is a decimal integer to indicate Bytesize.
The parameters are separated by a <SP> (Space, ASCII code
32).

The following codes are assigned for type:

\ /
A - ASCII | | N - Non-print
|-><-| T - Telnet format effectors
E - EBCDIC| | C - Carriage Control (ASA)
/ \
I - Image

L <byte size> - Local byte Byte size


Postel & Reynolds [Page 28]




RFC 959 October 1985
File Transfer Protocol


The default representation type is ASCII Non-print. If the
Format parameter is changed, and later just the first
argument is changed, Format then returns to the Non-print
default.

FILE STRUCTURE (STRU)

The argument is a single Telnet character code specifying
file structure described in the Section on Data
Representation and Storage.

The following codes are assigned for structure:

F - File (no record structure)
R - Record structure
P - Page structure

The default structure is File.

TRANSFER MODE (MODE)

The argument is a single Telnet character code specifying
the data transfer modes described in the Section on
Transmission Modes.

The following codes are assigned for transfer modes:

S - Stream
B - Block
C - Compressed

The default transfer mode is Stream.

4.1.3. FTP SERVICE COMMANDS

The FTP service commands define the file transfer or the file
system function requested by the user. The argument of an FTP
service command will normally be a pathname. The syntax of
pathnames must conform to server site conventions (with
standard defaults applicable), and the language conventions of
the control connection. The suggested default handling is to
use the last specified device, directory or file name, or the
standard default defined for local users. The commands may be
in any order except that a "rename from" command must be
followed by a "rename to" command and the restart command must
be followed by the interrupted service command (e.g., STOR or
RETR). The data, when transferred in response to FTP service


Postel & Reynolds [Page 29]

Wednesday, August 28th 2002 - 02:19:38 PM
what your parents call you: geo
what planet are you from??: geo
so i can reach you: geo
where am I???: magiclly appeared
whats a guestbook without a comment???:
Network Working Group J. Postel
Request for Comments: 959 J. Reynolds
ISI
Obsoletes RFC: 765 (IEN 149) October 1985

FILE TRANSFER PROTOCOL (FTP)


Status of this Memo

This memo is the official specification of the File Transfer
Protocol (FTP). Distribution of this memo is unlimited.

The following new optional commands are included in this edition of
the specification:

CDUP (Change to Parent Directory), SMNT (Structure Mount), STOU
(Store Unique), RMD (Remove Directory), MKD (Make Directory), PWD
(Print Directory), and SYST (System).

Note that this specification is compatible with the previous edition.

1. INTRODUCTION

The objectives of FTP are 1) to promote sharing of files (computer
programs and/or data), 2) to encourage indirect or implicit (via
programs) use of remote computers, 3) to shield a user from
variations in file storage systems among hosts, and 4) to transfer
data reliably and efficiently. FTP, though usable directly by a user
at a terminal, is designed mainly for use by programs.

The attempt in this specification is to satisfy the diverse needs of
users of maxi-hosts, mini-hosts, personal workstations, and TACs,
with a simple, and easily implemented protocol design.

This paper assumes knowledge of the Transmission Control Protocol
(TCP) [2] and the Telnet Protocol [3]. These documents are contained
in the ARPA-Internet protocol handbook [1].

2. OVERVIEW

In this section, the history, the terminology, and the FTP model are
discussed. The terms defined in this section are only those that
have special significance in FTP. Some of the terminology is very
specific to the FTP model; some readers may wish to turn to the
section on the FTP model while reviewing the terminology.







Postel & Reynolds [Page 1]




RFC 959 October 1985
File Transfer Protocol


2.1. HISTORY

FTP has had a long evolution over the years. Appendix III is a
chronological compilation of Request for Comments documents
relating to FTP. These include the first proposed file transfer
mechanisms in 1971 that were developed for implementation on hosts
at M.I.T. (RFC 114), plus comments and discussion in RFC 141.

RFC 172 provided a user-level oriented protocol for file transfer
between host computers (including terminal IMPs). A revision of
this as RFC 265, restated FTP for additional review, while RFC 281
suggested further changes. The use of a "Set Data Type"
transaction was proposed in RFC 294 in January 1982.

RFC 354 obsoleted RFCs 264 and 265. The File Transfer Protocol
was now defined as a protocol for file transfer between HOSTs on
the ARPANET, with the primary function of FTP defined as
transfering files efficiently and reliably among hosts and
allowing the convenient use of remote file storage capabilities.
RFC 385 further commented on errors, emphasis points, and
additions to the protocol, while RFC 414 provided a status report
on the working server and user FTPs. RFC 430, issued in 1973,
(among other RFCs too numerous to mention) presented further
comments on FTP. Finally, an "official" FTP document was
published as RFC 454.

By July 1973, considerable changes from the last versions of FTP
were made, but the general structure remained the same. RFC 542
was published as a new "official" specification to reflect these
changes. However, many implementations based on the older
specification were not updated.

In 1974, RFCs 607 and 614 continued comments on FTP. RFC 624
proposed further design changes and minor modifications. In 1975,
RFC 686 entitled, "Leaving Well Enough Alone", discussed the
differences between all of the early and later versions of FTP.
RFC 691 presented a minor revision of RFC 686, regarding the
subject of print files.

Motivated by the transition from the NCP to the TCP as the
underlying protocol, a phoenix was born out of all of the above
efforts in RFC 765 as the specification of FTP for use on TCP.

This current edition of the FTP specification is intended to
correct some minor documentation errors, to improve the
explanation of some protocol features, and to add some new
optional commands.


Postel & Reynolds [Page 2]




RFC 959 October 1985
File Transfer Protocol


In particular, the following new optional commands are included in
this edition of the specification:

CDUP - Change to Parent Directory

SMNT - Structure Mount

STOU - Store Unique

RMD - Remove Directory

MKD - Make Directory

PWD - Print Directory

SYST - System

This specification is compatible with the previous edition. A
program implemented in conformance to the previous specification
should automatically be in conformance to this specification.

2.2. TERMINOLOGY

ASCII

The ASCII character set is as defined in the ARPA-Internet
Protocol Handbook. In FTP, ASCII characters are defined to be
the lower half of an eight-bit code set (i.e., the most
significant bit is zero).

access controls

Access controls define users' access privileges to the use of a
system, and to the files in that system. Access controls are
necessary to prevent unauthorized or accidental use of files.
It is the prerogative of a server-FTP process to invoke access
controls.

byte size

There are two byte sizes of interest in FTP: the logical byte
size of the file, and the transfer byte size used for the
transmission of the data. The transfer byte size is always 8
bits. The transfer byte size is not necessarily the byte size
in which data is to be stored in a system, nor the logical byte
size for interpretation of the structure of the data.



Postel & Reynolds [Page 3]




RFC 959 October 1985
File Transfer Protocol


control connection

The communication path between the USER-PI and SERVER-PI for
the exchange of commands and replies. This connection follows
the Telnet Protocol.

data connection

A full duplex connection over which data is transferred, in a
specified mode and type. The data transferred may be a part of
a file, an entire file or a number of files. The path may be
between a server-DTP and a user-DTP, or between two
server-DTPs.

data port

The passive data transfer process "listens" on the data port
for a connection from the active transfer process in order to
open the data connection.

DTP

The data transfer process establishes and manages the data
connection. The DTP can be passive or active.

End-of-Line

The end-of-line sequence defines the separation of printing
lines. The sequence is Carriage Return, followed by Line Feed.

EOF

The end-of-file condition that defines the end of a file being
transferred.

EOR

The end-of-record condition that defines the end of a record
being transferred.

error recovery

A procedure that allows a user to recover from certain errors
such as failure of either host system or transfer process. In
FTP, error recovery may involve restarting a file transfer at a
given checkpoint.



Postel & Reynolds [Page 4]




RFC 959 October 1985
File Transfer Protocol


FTP commands

A set of commands that comprise the control information flowing
from the user-FTP to the server-FTP process.

file

An ordered set of computer data (including programs), of
arbitrary length, uniquely identified by a pathname.

mode

The mode in which data is to be transferred via the data
connection. The mode defines the data format during transfer
including EOR and EOF. The transfer modes defined in FTP are
described in the Section on Transmission Modes.

NVT

The Network Virtual Terminal as defined in the Telnet Protocol.

NVFS

The Network Virtual File System. A concept which defines a
standard network file system with standard commands and
pathname conventions.

page

A file may be structured as a set of independent parts called
pages. FTP supports the transmission of discontinuous files as
independent indexed pages.

pathname

Pathname is defined to be the character string which must be
input to a file system by a user in order to identify a file.
Pathname normally contains device and/or directory names, and
file name specification. FTP does not yet specify a standard
pathname convention. Each user must follow the file naming
conventions of the file systems involved in the transfer.

PI

The protocol interpreter. The user and server sides of the
protocol have distinct roles implemented in a user-PI and a
server-PI.


Postel & Reynolds [Page 5]




RFC 959 October 1985
File Transfer Protocol


record

A sequential file may be structured as a number of contiguous
parts called records. Record structures are supported by FTP
but a file need not have record structure.

reply

A reply is an acknowledgment (positive or negative) sent from
server to user via the control connection in response to FTP
commands. The general form of a reply is a completion code
(including error codes) followed by a text string. The codes
are for use by programs and the text is usually intended for
human users.

server-DTP

The data transfer process, in its normal "active" state,
establishes the data connection with the "listening" data port.
It sets up parameters for transfer and storage, and transfers
data on command from its PI. The DTP can be placed in a
"passive" state to listen for, rather than initiate a
connection on the data port.

server-FTP process

A process or set of processes which perform the function of
file transfer in cooperation with a user-FTP process and,
possibly, another server. The functions consist of a protocol
interpreter (PI) and a data transfer process (DTP).

server-PI

The server protocol interpreter "listens" on Port L for a
connection from a user-PI and establishes a control
communication connection. It receives standard FTP commands
from the user-PI, sends replies, and governs the server-DTP.

type

The data representation type used for data transfer and
storage. Type implies certain transformations between the time
of data storage and data transfer. The representation types
defined in FTP are described in the Section on Establishing
Data Connections.




Postel & Reynolds [Page 6]




RFC 959 October 1985
File Transfer Protocol


user

A person or a process on behalf of a person wishing to obtain
file transfer service. The human user may interact directly
with a server-FTP process, but use of a user-FTP process is
preferred since the protocol design is weighted towards
automata.

user-DTP

The data transfer process "listens" on the data port for a
connection from a server-FTP process. If two servers are
transferring data between them, the user-DTP is inactive.

user-FTP process

A set of functions including a protocol interpreter, a data
transfer process and a user interface which together perform
the function of file transfer in cooperation with one or more
server-FTP processes. The user interface allows a local
language to be used in the command-reply dialogue with the
user.

user-PI

The user protocol interpreter initiates the control connection
from its port U to the server-FTP process, initiates FTP
commands, and governs the user-DTP if that process is part of
the file transfer.




















Postel & Reynolds [Page 7]




RFC 959 October 1985
File Transfer Protocol


2.3. THE FTP MODEL

With the above definitions in mind, the following model (shown in
Figure 1) may be diagrammed for an FTP service.

-------------
|/---------\|
|| User || --------
||Interface|<--->| User |
|\----^----/| --------
---------- | | |
|/------\| FTP Commands |/----V----\|
||Server|<---------------->| User ||
|| PI || FTP Replies || PI ||
|\--^---/| |\----^----/|
| | | | | |
-------- |/--V---\| Data |/----V----\| --------
| File |<--->|Server|<---------------->| User |<--->| File |
|System| || DTP || Connection || DTP || |System|
-------- |\------/| |\---------/| --------
---------- -------------

Server-FTP USER-FTP

NOTES: 1. The data connection may be used in either direction.
2. The data connection need not exist all of the time.

Figure 1 Model for FTP Use

In the model described in Figure 1, the user-protocol interpreter
initiates the control connection. The control connection follows
the Telnet protocol. At the initiation of the user, standard FTP
commands are generated by the user-PI and transmitted to the
server process via the control connection. (The user may
establish a direct control connection to the server-FTP, from a
TAC terminal for example, and generate standard FTP commands
independently, bypassing the user-FTP process.) Standard replies
are sent from the server-PI to the user-PI over the control
connection in response to the commands.

The FTP commands specify the parameters for the data connection
(data port, transfer mode, representation type, and structure) and
the nature of file system operation (store, retrieve, append,
delete, etc.). The user-DTP or its designate should "listen" on
the specified data port, and the server initiate the data
connection and data transfer in accordance with the specified
parameters. It should be noted that the data port need not be in


Postel & Reynolds [Page 8]




RFC 959 October 1985
File Transfer Protocol


the same host that initiates the FTP commands via the control
connection, but the user or the user-FTP process must ensure a
"listen" on the specified data port. It ought to also be noted
that the data connection may be used for simultaneous sending and
receiving.

In another situation a user might wish to transfer files between
two hosts, neither of which is a local host. The user sets up
control connections to the two servers and then arranges for a
data connection between them. In this manner, control information
is passed to the user-PI but data is transferred between the
server data transfer processes. Following is a model of this
server-server interaction.


Control ------------ Control
---------->| User-FTP |<-----------
| | User-PI | |
| | "C" | |
V ------------ V
-------------- --------------
| Server-FTP | Data Connection | Server-FTP |
| "A" |<---------------------->| "B" |
-------------- Port (A) Port (B) --------------


Figure 2

The protocol requires that the control connections be open while
data transfer is in progress. It is the responsibility of the
user to request the closing of the control connections when
finished using the FTP service, while it is the server who takes
the action. The server may abort data transfer if the control
connections are closed without command.

The Relationship between FTP and Telnet:

The FTP uses the Telnet protocol on the control connection.
This can be achieved in two ways: first, the user-PI or the
server-PI may implement the rules of the Telnet Protocol
directly in their own procedures; or, second, the user-PI or
the server-PI may make use of the existing Telnet module in the
system.

Ease of implementaion, sharing code, and modular programming
argue for the second approach. Efficiency and independence



Postel & Reynolds [Page 9]




RFC 959 October 1985
File Transfer Protocol


argue for the first approach. In practice, FTP relies on very
little of the Telnet Protocol, so the first approach does not
necessarily involve a large amount of code.

3. DATA TRANSFER FUNCTIONS

Files are transferred only via the data connection. The control
connection is used for the transfer of commands, which describe the
functions to be performed, and the replies to these commands (see the
Section on FTP Replies). Several commands are concerned with the
transfer of data between hosts. These data transfer commands include
the MODE command which specify how the bits of the data are to be
transmitted, and the STRUcture and TYPE commands, which are used to
define the way in which the data are to be represented. The
transmission and representation are basically independent but the
"Stream" transmission mode is dependent on the file structure
attribute and if "Compressed" transmission mode is used, the nature
of the filler byte depends on the representation type.

3.1. DATA REPRESENTATION AND STORAGE

Data is transferred from a storage device in the sending host to a
storage device in the receiving host. Often it is necessary to
perform certain transformations on the data because data storage
representations in the two systems are different. For example,
NVT-ASCII has different data storage representations in different
systems. DEC TOPS-20s's generally store NVT-ASCII as five 7-bit
ASCII characters, left-justified in a 36-bit word. IBM Mainframe's
store NVT-ASCII as 8-bit EBCDIC codes. Multics stores NVT-ASCII
as four 9-bit characters in a 36-bit word. It is desirable to
convert characters into the standard NVT-ASCII representation when
transmitting text between dissimilar systems. The sending and
receiving sites would have to perform the necessary
transformations between the standard representation and their
internal representations.

A different problem in representation arises when transmitting
binary data (not character codes) between host systems with
different word lengths. It is not always clear how the sender
should send data, and the receiver store it. For example, when
transmitting 32-bit bytes from a 32-bit word-length system to a
36-bit word-length system, it may be desirable (for reasons of
efficiency and usefulness) to store the 32-bit bytes
right-justified in a 36-bit word in the latter system. In any
case, the user should have the option of specifying data
representation and transformation functions. It should be noted



Postel & Reynolds [Page 10]




RFC 959 October 1985
File Transfer Protocol


that FTP provides for very limited data type representations.
Transformations desired beyond this limited capability should be
performed by the user directly.

3.1.1. DATA TYPES

Data representations are handled in FTP by a user specifying a
representation type. This type may implicitly (as in ASCII or
EBCDIC) or explicitly (as in Local byte) define a byte size for
interpretation which is referred to as the "logical byte size."
Note that this has nothing to do with the byte size used for
transmission over the data connection, called the "transfer
byte size", and the two should not be confused. For example,
NVT-ASCII has a logical byte size of 8 bits. If the type is
Local byte, then the TYPE command has an obligatory second
parameter specifying the logical byte size. The transfer byte
size is always 8 bits.

3.1.1.1. ASCII TYPE

This is the default type and must be accepted by all FTP
implementations. It is intended primarily for the transfer
of text files, except when both hosts would find the EBCDIC
type more convenient.

The sender converts the data from an internal character
representation to the standard 8-bit NVT-ASCII
representation (see the Telnet specification). The receiver
will convert the data from the standard form to his own
internal form.

In accordance with the NVT standard, the <CRLF> sequence
should be used where necessary to denote the end of a line
of text. (See the discussion of file structure at the end
of the Section on Data Representation and Storage.)

Using the standard NVT-ASCII representation means that data
must be interpreted as 8-bit bytes.

The Format parameter for ASCII and EBCDIC types is discussed
below.








Postel & Reynolds [Page 11]




RFC 959 October 1985
File Transfer Protocol


3.1.1.2. EBCDIC TYPE

This type is intended for efficient transfer between hosts
which use EBCDIC for their internal character
representation.

For transmission, the data are represented as 8-bit EBCDIC
characters. The character code is the only difference
between the functional specifications of EBCDIC and ASCII
types.

End-of-line (as opposed to end-of-record--see the discussion
of structure) will probably be rarely used with EBCDIC type
for purposes of denoting structure, but where it is
necessary the <NL> character should be used.

3.1.1.3. IMAGE TYPE

The data are sent as contiguous bits which, for transfer,
are packed into the 8-bit transfer bytes. The receiving
site must store the data as contiguous bits. The structure
of the storage system might necessitate the padding of the
file (or of each record, for a record-structured file) to
some convenient boundary (byte, word or block). This
padding, which must be all zeros, may occur only at the end
of the file (or at the end of each record) and there must be
a way of identifying the padding bits so that they may be
stripped off if the file is retrieved. The padding
transformation should be well publicized to enable a user to
process a file at the storage site.

Image type is intended for the efficient storage and
retrieval of files and for the transfer of binary data. It
is recommended that this type be accepted by all FTP
implementations.

3.1.1.4. LOCAL TYPE

The data is transferred in logical bytes of the size
specified by the obligatory second parameter, Byte size.
The value of Byte size must be a decimal integer; there is
no default value. The logical byte size is not necessarily
the same as the transfer byte size. If there is a
difference in byte sizes, then the logical bytes should be
packed contiguously, disregarding transfer byte boundaries
and with any necessary padding at the end.



Postel & Reynolds [Page 12]




RFC 959 October 1985
File Transfer Protocol


When the data reaches the receiving host, it will be
transformed in a manner dependent on the logical byte size
and the particular host. This transformation must be
invertible (i.e., an identical file can be retrieved if the
same parameters are used) and should be well publicized by
the FTP implementors.

For example, a user sending 36-bit floating-point numbers to
a host with a 32-bit word could send that data as Local byte
with a logical byte size of 36. The receiving host would
then be expected to store the logical bytes so that they
could be easily manipulated; in this example putting the
36-bit logical bytes into 64-bit double words should
suffice.

In another example, a pair of hosts with a 36-bit word size
may send data to one another in words by using TYPE L 36.
The data would be sent in the 8-bit transmission bytes
packed so that 9 transmission bytes carried two host words.

3.1.1.5. FORMAT CONTROL

The types ASCII and EBCDIC also take a second (optional)
parameter; this is to indicate what kind of vertical format
control, if any, is associated with a file. The following
data representation types are defined in FTP:

A character file may be transferred to a host for one of
three purposes: for printing, for storage and later
retrieval, or for processing. If a file is sent for
printing, the receiving host must know how the vertical
format control is represented. In the second case, it must
be possible to store a file at a host and then retrieve it
later in exactly the same form. Finally, it should be
possible to move a file from one host to another and process
the file at the second host without undue trouble. A single
ASCII or EBCDIC format does not satisfy all these
conditions. Therefore, these types have a second parameter
specifying one of the following three formats:

3.1.1.5.1. NON PRINT

This is the default format to be used if the second
(format) parameter is omitted. Non-print format must be
accepted by all FTP implementations.




Postel & Reynolds [Page 13]




RFC 959 October 1985
File Transfer Protocol


The file need contain no vertical format information. If
it is passed to a printer process, this process may
assume standard values for spacing and margins.

Normally, this format will be used with files destined
for processing or just storage.

3.1.1.5.2. TELNET FORMAT CONTROLS

The file contains ASCII/EBCDIC vertical format controls
(i.e., <CR>, <LF>, <NL>, <VT>, <FF>) which the printer
process will interpret appropriately. <CRLF>, in exactly
this sequence, also denotes end-of-line.

3.1.1.5.2. CARRIAGE CONTROL (ASA)

The file contains ASA (FORTRAN) vertical format control
characters. (See RFC 740 Appendix C; and Communications
of the ACM, Vol. 7, No. 10, p. 606, October 1964.) In a
line or a record formatted according to the ASA Standard,
the first character is not to be printed. Instead, it
should be used to determine the vertical movement of the
paper which should take place before the rest of the
record is printed.

The ASA Standard specifies the following control
characters:

Character Vertical Spacing

blank Move paper up one line
0 Move paper up two lines
1 Move paper to top of next page
+ No movement, i.e., overprint

Clearly there must be some way for a printer process to
distinguish the end of the structural entity. If a file
has record structure (see below) this is no problem;
records will be explicitly marked during transfer and
storage. If the file has no record structure, the <CRLF>
end-of-line sequence is used to separate printing lines,
but these format effectors are overridden by the ASA
controls.






Postel & Reynolds [Page 14]




RFC 959 October 1985
File Transfer Protocol


3.1.2. DATA STRUCTURES

In addition to different representation types, FTP allows the
structure of a file to be specified. Three file structures are
defined in FTP:

file-structure, where there is no internal structure and
the file is considered to be a
continuous sequence of data bytes,

record-structure, where the file is made up of sequential
records,

and page-structure, where the file is made up of independent
indexed pages.

File-structure is the default to be assumed if the STRUcture
command has not been used but both file and record structures
must be accepted for "text" files (i.e., files with TYPE ASCII
or EBCDIC) by all FTP implementations. The structure of a file
will affect both the transfer mode of a file (see the Section
on Transmission Modes) and the interpretation and storage of
the file.

The "natural" structure of a file will depend on which host
stores the file. A source-code file will usually be stored on
an IBM Mainframe in fixed length records but on a DEC TOPS-20
as a stream of characters partitioned into lines, for example
by <CRLF>. If the transfer of files between such disparate
sites is to be useful, there must be some way for one site to
recognize the other's assumptions about the file.

With some sites being naturally file-oriented and others
naturally record-oriented there may be problems if a file with
one structure is sent to a host oriented to the other. If a
text file is sent with record-structure to a host which is file
oriented, then that host should apply an internal
transformation to the file based on the record structure.
Obviously, this transformation should be useful, but it must
also be invertible so that an identical file may be retrieved
using record structure.

In the case of a file being sent with file-structure to a
record-oriented host, there exists the question of what
criteria the host should use to divide the file into records
which can be processed locally. If this division is necessary,
the FTP implementation should use the end-of-line sequence,


Postel & Reynolds
Wednesday, August 28th 2002 - 02:06:55 PM
what your parents call you: geo
what planet are you from??: geo
so i can reach you: geo
where am I???: magiclly appeared
whats a guestbook without a comment???:RFC 959 October 1985
File Transfer Protocol


6. STATE DIAGRAMS

Here we present state diagrams for a very simple minded FTP
implementation. Only the first digit of the reply codes is used.
There is one state diagram for each group of FTP commands or command
sequences.

The command groupings were determined by constructing a model for
each command then collecting together the commands with structurally
identical models.

For each command or command sequence there are three possible
outcomes: success (S), failure (F), and error (E). In the state
diagrams below we use the symbol B for "begin", and the symbol W for
"wait for reply".

We first present the diagram that represents the largest group of FTP
commands:


1,3 +---+
----------->| E |
| +---+
|
+---+ cmd +---+ 2 +---+
| B |---------->| W |---------->| S |
+---+ +---+ +---+
|
| 4,5 +---+
----------->| F |
+---+


This diagram models the commands:

ABOR, ALLO, DELE, CWD, CDUP, SMNT, HELP, MODE, NOOP, PASV,
QUIT, SITE, PORT, SYST, STAT, RMD, MKD, PWD, STRU, and TYPE.












Postel & Reynolds [Page 54]




RFC 959 October 1985
File Transfer Protocol


The other large group of commands is represented by a very similar
diagram:


3 +---+
----------->| E |
| +---+
|
+---+ cmd +---+ 2 +---+
| B |---------->| W |---------->| S |
+---+ --->+---+ +---+
| | |
| | | 4,5 +---+
| 1 | ----------->| F |
----- +---+


This diagram models the commands:

APPE, LIST, NLST, REIN, RETR, STOR, and STOU.

Note that this second model could also be used to represent the first
group of commands, the only difference being that in the first group
the 100 series replies are unexpected and therefore treated as error,
while the second group expects (some may require) 100 series replies.
Remember that at most, one 100 series reply is allowed per command.

The remaining diagrams model command sequences, perhaps the simplest
of these is the rename sequence:


+---+ RNFR +---+ 1,2 +---+
| B |---------->| W |---------->| E |
+---+ +---+ -->+---+
| | |
3 | | 4,5 |
-------------- ------ |
| | | +---+
| ------------->| S |
| | 1,3 | | +---+
| 2| --------
| | | |
V | | |
+---+ RNTO +---+ 4,5 ----->+---+
| |---------->| W |---------->| F |
+---+ +---+ +---+



Postel & Reynolds [Page 55]




RFC 959 October 1985
File Transfer Protocol


The next diagram is a simple model of the Restart command:


+---+ REST +---+ 1,2 +---+
| B |---------->| W |---------->| E |
+---+ +---+ -->+---+
| | |
3 | | 4,5 |
-------------- ------ |
| | | +---+
| ------------->| S |
| | 3 | | +---+
| 2| --------
| | | |
V | | |
+---+ cmd +---+ 4,5 ----->+---+
| |---------->| W |---------->| F |
+---+ -->+---+ +---+
| |
| 1 |
------


Where "cmd" is APPE, STOR, or RETR.

We note that the above three models are similar. The Restart differs
from the Rename two only in the treatment of 100 series replies at
the second stage, while the second group expects (some may require)
100 series replies. Remember that at most, one 100 series reply is
allowed per command.



















Postel & Reynolds [Page 56]




RFC 959 October 1985
File Transfer Protocol


The most complicated diagram is for the Login sequence:


1
+---+ USER +---+------------->+---+
| B |---------->| W | 2 ---->| E |
+---+ +---+------ | -->+---+
| | | | |
3 | | 4,5 | | |
-------------- ----- | | |
| | | | |
| | | | |
| --------- |
| 1| | | |
V | | | |
+---+ PASS +---+ 2 | ------>+---+
| |---------->| W |------------->| S |
+---+ +---+ ---------->+---+
| | | | |
3 | |4,5| | |
-------------- -------- |
| | | | |
| | | | |
| -----------
| 1,3| | | |
V | 2| | |
+---+ ACCT +---+-- | ----->+---+
| |---------->| W | 4,5 -------->| F |
+---+ +---+------------->+---+




















Postel & Reynolds [Page 57]




RFC 959 October 1985
File Transfer Protocol


Finally, we present a generalized diagram that could be used to model
the command and reply interchange:


------------------------------------
| |
Begin | |
| V |
| +---+ cmd +---+ 2 +---+ |
-->| |------->| |---------->| | |
| | | W | | S |-----|
-->| | -->| |----- | | |
| +---+ | +---+ 4,5 | +---+ |
| | | | | | |
| | | 1| |3 | +---+ |
| | | | | | | | |
| | ---- | ---->| F |-----
| | | | |
| | | +---+
-------------------
|
|
V
End

























Postel & Reynolds [Page 58]




RFC 959 October 1985
File Transfer Protocol


7. TYPICAL FTP SCENARIO

User at host U wanting to transfer files to/from host S:

In general, the user will communicate to the server via a mediating
user-FTP process. The following may be a typical scenario. The
user-FTP prompts are shown in parentheses, '---->' represents
commands from host U to host S, and '<----' represents replies from
host S to host U.

LOCAL COMMANDS BY USER ACTION INVOLVED

ftp (host) multics<CR> Connect to host S, port L,
establishing control connections.
<---- 220 Service ready <CRLF>.
username Doe <CR> USER Doe<CRLF>---->
<---- 331 User name ok,
need password<CRLF>.
password mumble <CR> PASS mumble<CRLF>---->
<---- 230 User logged in<CRLF>.
retrieve (local type) ASCII<CR>
(local pathname) test 1 <CR> User-FTP opens local file in ASCII.
(for. pathname) test.pl1<CR> RETR test.pl1<CRLF> ---->
<---- 150 File status okay;
about to open data
connection<CRLF>.
Server makes data connection
to port U.

<---- 226 Closing data connection,
file transfer successful<CRLF>.
type Image<CR> TYPE I<CRLF> ---->
<---- 200 Command OK<CRLF>
store (local type) image<CR>
(local pathname) file dump<CR> User-FTP opens local file in Image.
(for.pathname) >udd>cn>fd<CR> STOR >udd>cn>fd<CRLF> ---->
<---- 550 Access denied<CRLF>
terminate QUIT <CRLF> ---->
Server closes all
connections.

8. CONNECTION ESTABLISHMENT

The FTP control connection is established via TCP between the user
process port U and the server process port L. This protocol is
assigned the service port 21 (25 octal), that is L=21.



Postel & Reynolds [Page 59]




RFC 959 October 1985
File Transfer Protocol


APPENDIX I - PAGE STRUCTURE

The need for FTP to support page structure derives principally from
the need to support efficient transmission of files between TOPS-20
systems, particularly the files used by NLS.

The file system of TOPS-20 is based on the concept of pages. The
operating system is most efficient at manipulating files as pages.
The operating system provides an interface to the file system so that
many applications view files as sequential streams of characters.
However, a few applications use the underlying page structures
directly, and some of these create holey files.

A TOPS-20 disk file consists of four things: a pathname, a page
table, a (possibly empty) set of pages, and a set of attributes.

The pathname is specified in the RETR or STOR command. It includes
the directory name, file name, file name extension, and generation
number.

The page table contains up to 2**18 entries. Each entry may be
EMPTY, or may point to a page. If it is not empty, there are also
some page-specific access bits; not all pages of a file need have the
same access protection.

A page is a contiguous set of 512 words of 36 bits each.

The attributes of the file, in the File Descriptor Block (FDB),
contain such things as creation time, write time, read time, writer's
byte-size, end-of-file pointer, count of reads and writes, backup
system tape numbers, etc.

Note that there is NO requirement that entries in the page table be
contiguous. There may be empty page table slots between occupied
ones. Also, the end of file pointer is simply a number. There is no
requirement that it in fact point at the "last" datum in the file.
Ordinary sequential I/O calls in TOPS-20 will cause the end of file
pointer to be left after the last datum written, but other operations
may cause it not to be so, if a particular programming system so
requires.

In fact, in both of these special cases, "holey" files and
end-of-file pointers NOT at the end of the file, occur with NLS data
files.





Postel & Reynolds [Page 60]




RFC 959 October 1985
File Transfer Protocol


The TOPS-20 paged files can be sent with the FTP transfer parameters:
TYPE L 36, STRU P, and MODE S (in fact, any mode could be used).

Each page of information has a header. Each header field, which is a
logical byte, is a TOPS-20 word, since the TYPE is L 36.

The header fields are:

Word 0: Header Length.

The header length is 5.

Word 1: Page Index.

If the data is a disk file page, this is the number of that
page in the file's page map. Empty pages (holes) in the file
are simply not sent. Note that a hole is NOT the same as a
page of zeros.

Word 2: Data Length.

The number of data words in this page, following the header.
Thus, the total length of the transmission unit is the Header
Length plus the Data Length.

Word 3: Page Type.

A code for what type of chunk this is. A data page is type 3,
the FDB page is type 2.

Word 4: Page Access Control.

The access bits associated with the page in the file's page
map. (This full word quantity is put into AC2 of an SPACS by
the program reading from net to disk.)

After the header are Data Length data words. Data Length is
currently either 512 for a data page or 31 for an FDB. Trailing
zeros in a disk file page may be discarded, making Data Length less
than 512 in that case.









Postel & Reynolds [Page 61]




RFC 959 October 1985
File Transfer Protocol


APPENDIX II - DIRECTORY COMMANDS

Since UNIX has a tree-like directory structure in which directories
are as easy to manipulate as ordinary files, it is useful to expand
the FTP servers on these machines to include commands which deal with
the creation of directories. Since there are other hosts on the
ARPA-Internet which have tree-like directories (including TOPS-20 and
Multics), these commands are as general as possible.

Four directory commands have been added to FTP:

MKD pathname

Make a directory with the name "pathname".

RMD pathname

Remove the directory with the name "pathname".

PWD

Print the current working directory name.

CDUP

Change to the parent of the current working directory.

The "pathname" argument should be created (removed) as a
subdirectory of the current working directory, unless the "pathname"
string contains sufficient information to specify otherwise to the
server, e.g., "pathname" is an absolute pathname (in UNIX and
Multics), or pathname is something like "<abso.lute.path>" to
TOPS-20.

REPLY CODES

The CDUP command is a special case of CWD, and is included to
simplify the implementation of programs for transferring directory
trees between operating systems having different syntaxes for
naming the parent directory. The reply codes for CDUP be
identical to the reply codes of CWD.

The reply codes for RMD be identical to the reply codes for its
file analogue, DELE.

The reply codes for MKD, however, are a bit more complicated. A
freshly created directory will probably be the object of a future


Postel & Reynolds [Page 62]




RFC 959 October 1985
File Transfer Protocol


CWD command. Unfortunately, the argument to MKD may not always be
a suitable argument for CWD. This is the case, for example, when
a TOPS-20 subdirectory is created by giving just the subdirectory
name. That is, with a TOPS-20 server FTP, the command sequence

MKD MYDIR
CWD MYDIR

will fail. The new directory may only be referred to by its
"absolute" name; e.g., if the MKD command above were issued while
connected to the directory <DFRANKLIN>, the new subdirectory
could only be referred to by the name <DFRANKLIN.MYDIR>.

Even on UNIX and Multics, however, the argument given to MKD may
not be suitable. If it is a "relative" pathname (i.e., a pathname
which is interpreted relative to the current directory), the user
would need to be in the same current directory in order to reach
the subdirectory. Depending on the application, this may be
inconvenient. It is not very robust in any case.

To solve these problems, upon successful completion of an MKD
command, the server should return a line of the form:

257<space>"<directory-name>"<space><commentary>

That is, the server will tell the user what string to use when
referring to the created directory. The directory name can
contain any character; embedded double-quotes should be escaped by
double-quotes (the "quote-doubling" convention).

For example, a user connects to the directory /usr/dm, and creates
a subdirectory, named pathname:

CWD /usr/dm
200 directory changed to /usr/dm
MKD pathname
257 "/usr/dm/pathname" directory created

An example with an embedded double quote:

MKD foo"bar
257 "/usr/dm/foo""bar" directory created
CWD /usr/dm/foo"bar
200 directory changed to /usr/dm/foo"bar





Postel & Reynolds [Page 63]




RFC 959 October 1985
File Transfer Protocol


The prior existence of a subdirectory with the same name is an
error, and the server must return an "access denied" error reply
in that case.

CWD /usr/dm
200 directory changed to /usr/dm
MKD pathname
521-"/usr/dm/pathname" directory already exists;
521 taking no action.

The failure replies for MKD are analogous to its file creating
cousin, STOR. Also, an "access denied" return is given if a file
name with the same name as the subdirectory will conflict with the
creation of the subdirectory (this is a problem on UNIX, but
shouldn't be one on TOPS-20).

Essentially because the PWD command returns the same type of
information as the successful MKD command, the successful PWD
command uses the 257 reply code as well.

SUBTLETIES

Because these commands will be most useful in transferring
subtrees from one machine to another, carefully observe that the
argument to MKD is to be interpreted as a sub-directory of the
current working directory, unless it contains enough information
for the destination host to tell otherwise. A hypothetical
example of its use in the TOPS-20 world:

CWD <some.where>
200 Working directory changed
MKD overrainbow
257 "<some.where.overrainbow>" directory created
CWD overrainbow
431 No such directory
CWD <some.where.overrainbow>
200 Working directory changed

CWD <some.where>
200 Working directory changed to <some.where>
MKD <unambiguous>
257 "<unambiguous>" directory created
CWD <unambiguous>

Note that the first example results in a subdirectory of the
connected directory. In contrast, the argument in the second
example contains enough information for TOPS-20 to tell that the


Postel & Reynolds [Page 64]




RFC 959 October 1985
File Transfer Protocol


<unambiguous> directory is a top-level directory. Note also that
in the first example the user "violated" the protocol by
attempting to access the freshly created directory with a name
other than the one returned by TOPS-20. Problems could have
resulted in this case had there been an <overrainbow> directory;
this is an ambiguity inherent in some TOPS-20 implementations.
Similar considerations apply to the RMD command. The point is
this: except where to do so would violate a host's conventions for
denoting relative versus absolute pathnames, the host should treat
the operands of the MKD and RMD commands as subdirectories. The
257 reply to the MKD command must always contain the absolute
pathname of the created directory.





































Postel & Reynolds [Page 65]




RFC 959 October 1985
File Transfer Protocol


APPENDIX III - RFCs on FTP

Bhushan, Abhay, "A File Transfer Protocol", RFC 114 (NIC 5823),
MIT-Project MAC, 16 April 1971.

Harslem, Eric, and John Heafner, "Comments on RFC 114 (A File
Transfer Protocol)", RFC 141 (NIC 6726), RAND, 29 April 1971.

Bhushan, Abhay, et al, "The File Transfer Protocol", RFC 172
(NIC 6794), MIT-Project MAC, 23 June 1971.

Braden, Bob, "Comments on DTP and FTP Proposals", RFC 238 (NIC 7663),
UCLA/CCN, 29 September 1971.

Bhushan, Abhay, et al, "The File Transfer Protocol", RFC 265
(NIC 7813), MIT-Project MAC, 17 November 1971.

McKenzie, Alex, "A Suggested Addition to File Transfer Protocol",
RFC 281 (NIC 8163), BBN, 8 December 1971.

Bhushan, Abhay, "The Use of "Set Data Type" Transaction in File
Transfer Protocol", RFC 294 (NIC 8304), MIT-Project MAC,
25 January 1972.

Bhushan, Abhay, "The File Transfer Protocol", RFC 354 (NIC 10596),
MIT-Project MAC, 8 July 1972.

Bhushan, Abhay, "Comments on the File Transfer Protocol (RFC 354)",
RFC 385 (NIC 11357), MIT-Project MAC, 18 August 1972.

Hicks, Greg, "User FTP Documentation", RFC 412 (NIC 12404), Utah,
27 November 1972.

Bhushan, Abhay, "File Transfer Protocol (FTP) Status and Further
Comments", RFC 414 (NIC 12406), MIT-Project MAC, 20 November 1972.

Braden, Bob, "Comments on File Transfer Protocol", RFC 430
(NIC 13299), UCLA/CCN, 7 February 1973.

Thomas, Bob, and Bob Clements, "FTP Server-Server Interaction",
RFC 438 (NIC 13770), BBN, 15 January 1973.

Braden, Bob, "Print Files in FTP", RFC 448 (NIC 13299), UCLA/CCN,
27 February 1973.

McKenzie, Alex, "File Transfer Protocol", RFC 454 (NIC 14333), BBN,
16 February 1973.


Postel & Reynolds [Page 66]




RFC 959 October 1985
File Transfer Protocol


Bressler, Bob, and Bob Thomas, "Mail Retrieval via FTP", RFC 458
(NIC 14378), BBN-NET and BBN-TENEX, 20 February 1973.

Neigus, Nancy, "File Transfer Protocol", RFC 542 (NIC 17759), BBN,
12 July 1973.

Krilanovich, Mark, and George Gregg, "Comments on the File Transfer
Protocol", RFC 607 (NIC 21255), UCSB, 7 January 1974.

Pogran, Ken, and Nancy Neigus, "Response to RFC 607 - Comments on the
File Transfer Protocol", RFC 614 (NIC 21530), BBN, 28 January 1974.

Krilanovich, Mark, George Gregg, Wayne Hathaway, and Jim White,
"Comments on the File Transfer Protocol", RFC 624 (NIC 22054), UCSB,
Ames Research Center, SRI-ARC, 28 February 1974.

Bhushan, Abhay, "FTP Comments and Response to RFC 430", RFC 463
(NIC 14573), MIT-DMCG, 21 February 1973.

Braden, Bob, "FTP Data Compression", RFC 468 (NIC 14742), UCLA/CCN,
8 March 1973.

Bhushan, Abhay, "FTP and Network Mail System", RFC 475 (NIC 14919),
MIT-DMCG, 6 March 1973.

Bressler, Bob, and Bob Thomas "FTP Server-Server Interaction - II",
RFC 478 (NIC 14947), BBN-NET and BBN-TENEX, 26 March 1973.

White, Jim, "Use of FTP by the NIC Journal", RFC 479 (NIC 14948),
SRI-ARC, 8 March 1973.

White, Jim, "Host-Dependent FTP Parameters", RFC 480 (NIC 14949),
SRI-ARC, 8 March 1973.

Padlipsky, Mike, "An FTP Command-Naming Problem", RFC 506
(NIC 16157), MIT-Multics, 26 June 1973.

Day, John, "Memo to FTP Group (Proposal for File Access Protocol)",
RFC 520 (NIC 16819), Illinois, 25 June 1973.

Merryman, Robert, "The UCSD-CC Server-FTP Facility", RFC 532
(NIC 17451), UCSD-CC, 22 June 1973.

Braden, Bob, "TENEX FTP Problem", RFC 571 (NIC 18974), UCLA/CCN,
15 November 1973.




Postel & Reynolds [Page 67]




RFC 959 October 1985
File Transfer Protocol


McKenzie, Alex, and Jon Postel, "Telnet and FTP Implementation -
Schedule Change", RFC 593 (NIC 20615), BBN and MITRE,
29 November 1973.

Sussman, Julie, "FTP Error Code Usage for More Reliable Mail
Service", RFC 630 (NIC 30237), BBN, 10 April 1974.

Postel, Jon, "Revised FTP Reply Codes", RFC 640 (NIC 30843),
UCLA/NMC, 5 June 1974.

Harvey, Brian, "Leaving Well Enough Alone", RFC 686 (NIC 32481),
SU-AI, 10 May 1975.

Harvey, Brian, "One More Try on the FTP", RFC 691 (NIC 32700), SU-AI,
28 May 1975.

Lieb, J., "CWD Command of FTP", RFC 697 (NIC 32963), 14 July 1975.

Harrenstien, Ken, "FTP Extension: XSEN", RFC 737 (NIC 42217), SRI-KL,
31 October 1977.

Harrenstien, Ken, "FTP Extension: XRSQ/XRCP", RFC 743 (NIC 42758),
SRI-KL, 30 December 1977.

Lebling, P. David, "Survey of FTP Mail and MLFL", RFC 751, MIT,
10 December 1978.

Postel, Jon, "File Transfer Protocol Specification", RFC 765, ISI,
June 1980.

Mankins, David, Dan Franklin, and Buzz Owen, "Directory Oriented FTP
Commands", RFC 776, BBN, December 1980.

Padlipsky, Michael, "FTP Unique-Named Store Command", RFC 949, MITRE,
July 1985.














Postel & Reynolds [Page 68]




RFC 959 October 1985
File Transfer Protocol


REFERENCES

[1] Feinler, Elizabeth, "Internet Protocol Transition Workbook",
Network Information Center, SRI International, March 1982.

[2] Postel, Jon, "Transmission Control Protocol - DARPA Internet
Program Protocol Specification", RFC 793, DARPA, September 1981.

[3] Postel, Jon, and Joyce Reynolds, "Telnet Protocol
Specification", RFC 854, ISI, May 1983.

[4] Reynolds, Joyce, and Jon Postel, "Assigned Numbers", RFC 943,
ISI, April 1985.




































Postel & Reynolds [Page 69]




Wednesday, August 28th 2002 - 02:01:02 PM
what your parents call you: geo
what planet are you from??: geo
so i can reach you: geo
where am I???: magiclly appeared
whats a guestbook without a comment???:RFC 959 October 1985
File Transfer Protocol


110 Restart marker reply.
In this case, the text is exact and not left to the
particular implementation; it must read:
MARK yyyy = mmmm
Where yyyy is User-process data stream marker, and mmmm
server's equivalent marker (note the spaces between markers
and "=").
211 System status, or system help reply.
212 Directory status.
213 File status.
214 Help message.
On how to use the server or the meaning of a particular
non-standard command. This reply is useful only to the
human user.
215 NAME system type.
Where NAME is an official system name from the list in the
Assigned Numbers document.

120 Service ready in nnn minutes.
220 Service ready for new user.
221 Service closing control connection.
Logged out if appropriate.
421 Service not available, closing control connection.
This may be a reply to any command if the service knows it
must shut down.
125 Data connection already open; transfer starting.
225 Data connection open; no transfer in progress.
425 Can't open data connection.
226 Closing data connection.
Requested file action successful (for example, file
transfer or file abort).
426 Connection closed; transfer aborted.
227 Entering Passive Mode (h1,h2,h3,h4,p1,p2).

230 User logged in, proceed.
530 Not logged in.
331 User name okay, need password.
332 Need account for login.
532 Need account for storing files.










Postel & Reynolds [Page 40]




RFC 959 October 1985
File Transfer Protocol


150 File status okay; about to open data connection.
250 Requested file action okay, completed.
257 "PATHNAME" created.
350 Requested file action pending further information.
450 Requested file action not taken.
File unavailable (e.g., file busy).
550 Requested action not taken.
File unavailable (e.g., file not found, no access).
451 Requested action aborted. Local error in processing.
551 Requested action aborted. Page type unknown.
452 Requested action not taken.
Insufficient storage space in system.
552 Requested file action aborted.
Exceeded storage allocation (for current directory or
dataset).
553 Requested action not taken.
File name not allowed.


4.2.2 Numeric Order List of Reply Codes

110 Restart marker reply.
In this case, the text is exact and not left to the
particular implementation; it must read:
MARK yyyy = mmmm
Where yyyy is User-process data stream marker, and mmmm
server's equivalent marker (note the spaces between markers
and "=").
120 Service ready in nnn minutes.
125 Data connection already open; transfer starting.
150 File status okay; about to open data connection.


















Postel & Reynolds [Page 41]




RFC 959 October 1985
File Transfer Protocol


200 Command okay.
202 Command not implemented, superfluous at this site.
211 System status, or system help reply.
212 Directory status.
213 File status.
214 Help message.
On how to use the server or the meaning of a particular
non-standard command. This reply is useful only to the
human user.
215 NAME system type.
Where NAME is an official system name from the list in the
Assigned Numbers document.
220 Service ready for new user.
221 Service closing control connection.
Logged out if appropriate.
225 Data connection open; no transfer in progress.
226 Closing data connection.
Requested file action successful (for example, file
transfer or file abort).
227 Entering Passive Mode (h1,h2,h3,h4,p1,p2).
230 User logged in, proceed.
250 Requested file action okay, completed.
257 "PATHNAME" created.

331 User name okay, need password.
332 Need account for login.
350 Requested file action pending further information.

421 Service not available, closing control connection.
This may be a reply to any command if the service knows it
must shut down.
425 Can't open data connection.
426 Connection closed; transfer aborted.
450 Requested file action not taken.
File unavailable (e.g., file busy).
451 Requested action aborted: local error in processing.
452 Requested action not taken.
Insufficient storage space in system.











Postel & Reynolds [Page 42]




RFC 959 October 1985
File Transfer Protocol


500 Syntax error, command unrecognized.
This may include errors such as command line too long.
501 Syntax error in parameters or arguments.
502 Command not implemented.
503 Bad sequence of commands.
504 Command not implemented for that parameter.
530 Not logged in.
532 Need account for storing files.
550 Requested action not taken.
File unavailable (e.g., file not found, no access).
551 Requested action aborted: page type unknown.
552 Requested file action aborted.
Exceeded storage allocation (for current directory or
dataset).
553 Requested action not taken.
File name not allowed.


5. DECLARATIVE SPECIFICATIONS

5.1. MINIMUM IMPLEMENTATION

In order to make FTP workable without needless error messages, the
following minimum implementation is required for all servers:

TYPE - ASCII Non-print
MODE - Stream
STRUCTURE - File, Record
COMMANDS - USER, QUIT, PORT,
TYPE, MODE, STRU,
for the default values
RETR, STOR,
NOOP.

The default values for transfer parameters are:

TYPE - ASCII Non-print
MODE - Stream
STRU - File

All hosts must accept the above as the standard defaults.








Postel & Reynolds [Page 43]




RFC 959 October 1985
File Transfer Protocol


5.2. CONNECTIONS

The server protocol interpreter shall "listen" on Port L. The
user or user protocol interpreter shall initiate the full-duplex
control connection. Server- and user- processes should follow the
conventions of the Telnet protocol as specified in the
ARPA-Internet Protocol Handbook [1]. Servers are under no
obligation to provide for editing of command lines and may require
that it be done in the user host. The control connection shall be
closed by the server at the user's request after all transfers and
replies are completed.

The user-DTP must "listen" on the specified data port; this may be
the default user port (U) or a port specified in the PORT command.
The server shall initiate the data connection from his own default
data port (L-1) using the specified user data port. The direction
of the transfer and the port used will be determined by the FTP
service command.

Note that all FTP implementation must support data transfer using
the default port, and that only the USER-PI may initiate the use
of non-default ports.

When data is to be transferred between two servers, A and B (refer
to Figure 2), the user-PI, C, sets up control connections with
both server-PI's. One of the servers, say A, is then sent a PASV
command telling him to "listen" on his data port rather than
initiate a connection when he receives a transfer service command.
When the user-PI receives an acknowledgment to the PASV command,
which includes the identity of the host and port being listened
on, the user-PI then sends A's port, a, to B in a PORT command; a
reply is returned. The user-PI may then send the corresponding
service commands to A and B. Server B initiates the connection
and the transfer proceeds. The command-reply sequence is listed
below where the messages are vertically synchronous but
horizontally asynchronous:













Postel & Reynolds [Page 44]




RFC 959 October 1985
File Transfer Protocol


User-PI - Server A User-PI - Server B
------------------ ------------------

C->A : Connect C->B : Connect
C->A : PASV
A->C : 227 Entering Passive Mode. A1,A2,A3,A4,a1,a2
C->B : PORT A1,A2,A3,A4,a1,a2
B->C : 200 Okay
C->A : STOR C->B : RETR
B->A : Connect to HOST-A, PORT-a

Figure 3

The data connection shall be closed by the server under the
conditions described in the Section on Establishing Data
Connections. If the data connection is to be closed following a
data transfer where closing the connection is not required to
indicate the end-of-file, the server must do so immediately.
Waiting until after a new transfer command is not permitted
because the user-process will have already tested the data
connection to see if it needs to do a "listen"; (remember that the
user must "listen" on a closed data port BEFORE sending the
transfer request). To prevent a race condition here, the server
sends a reply (226) after closing the data connection (or if the
connection is left open, a "file transfer completed" reply (250)
and the user-PI should wait for one of these replies before
issuing a new transfer command).

Any time either the user or server see that the connection is
being closed by the other side, it should promptly read any
remaining data queued on the connection and issue the close on its
own side.

5.3. COMMANDS

The commands are Telnet character strings transmitted over the
control connections as described in the Section on FTP Commands.
The command functions and semantics are described in the Section
on Access Control Commands, Transfer Parameter Commands, FTP
Service Commands, and Miscellaneous Commands. The command syntax
is specified here.

The commands begin with a command code followed by an argument
field. The command codes are four or fewer alphabetic characters.
Upper and lower case alphabetic characters are to be treated
identically. Thus, any of the following may represent the
retrieve command:


Postel & Reynolds [Page 45]




RFC 959 October 1985
File Transfer Protocol


RETR Retr retr ReTr rETr

This also applies to any symbols representing parameter values,
such as A or a for ASCII TYPE. The command codes and the argument
fields are separated by one or more spaces.

The argument field consists of a variable length character string
ending with the character sequence <CRLF> (Carriage Return, Line
Feed) for NVT-ASCII representation; for other negotiated languages
a different end of line character might be used. It should be
noted that the server is to take no action until the end of line
code is received.

The syntax is specified below in NVT-ASCII. All characters in the
argument field are ASCII characters including any ASCII
represented decimal integers. Square brackets denote an optional
argument field. If the option is not taken, the appropriate
default is implied.































Postel & Reynolds [Page 46]




RFC 959 October 1985
File Transfer Protocol


5.3.1. FTP COMMANDS

The following are the FTP commands:

USER <SP> <username> <CRLF>
PASS <SP> <password> <CRLF>
ACCT <SP> <account-information> <CRLF>
CWD <SP> <pathname> <CRLF>
CDUP <CRLF>
SMNT <SP> <pathname> <CRLF>
QUIT <CRLF>
REIN <CRLF>
PORT <SP> <host-port> <CRLF>
PASV <CRLF>
TYPE <SP> <type-code> <CRLF>
STRU <SP> <structure-code> <CRLF>
MODE <SP> <mode-code> <CRLF>
RETR <SP> <pathname> <CRLF>
STOR <SP> <pathname> <CRLF>
STOU <CRLF>
APPE <SP> <pathname> <CRLF>
ALLO <SP> <decimal-integer>
[<SP> R <SP> <decimal-integer>] <CRLF>
REST <SP> <marker> <CRLF>
RNFR <SP> <pathname> <CRLF>
RNTO <SP> <pathname> <CRLF>
ABOR <CRLF>
DELE <SP> <pathname> <CRLF>
RMD <SP> <pathname> <CRLF>
MKD <SP> <pathname> <CRLF>
PWD <CRLF>
LIST [<SP> <pathname>] <CRLF>
NLST [<SP> <pathname>] <CRLF>
SITE <SP> <string> <CRLF>
SYST <CRLF>
STAT [<SP> <pathname>] <CRLF>
HELP [<SP> <string>] <CRLF>
NOOP <CRLF>











Postel & Reynolds [Page 47]




RFC 959 October 1985
File Transfer Protocol


5.3.2. FTP COMMAND ARGUMENTS

The syntax of the above argument fields (using BNF notation
where applicable) is:

<username> ::= <string>
<password> ::= <string>
<account-information> ::= <string>
<string> ::= <char> | <char><string>
<char> ::= any of the 128 ASCII characters except <CR> and
<LF>
<marker> ::= <pr-string>
<pr-string> ::= <pr-char> | <pr-char><pr-string>
<pr-char> ::= printable characters, any
ASCII code 33 through 126
<byte-size> ::= <number>
<host-port> ::= <host-number>,<port-number>
<host-number> ::= <number>,<number>,<number>,<number>
<port-number> ::= <number>,<number>
<number> ::= any decimal integer 1 through 255
<form-code> ::= N | T | C
<type-code> ::= A [<sp> <form-code>]
| E [<sp> <form-code>]
| I
| L <sp> <byte-size>
<structure-code> ::= F | R | P
<mode-code> ::= S | B | C
<pathname> ::= <string>
<decimal-integer> ::= any decimal integer




















Postel & Reynolds [Page 48]




RFC 959 October 1985
File Transfer Protocol


5.4. SEQUENCING OF COMMANDS AND REPLIES

The communication between the user and server is intended to be an
alternating dialogue. As such, the user issues an FTP command and
the server responds with a prompt primary reply. The user should
wait for this initial primary success or failure response before
sending further commands.

Certain commands require a second reply for which the user should
also wait. These replies may, for example, report on the progress
or completion of file transfer or the closing of the data
connection. They are secondary replies to file transfer commands.

One important group of informational replies is the connection
greetings. Under normal circumstances, a server will send a 220
reply, "awaiting input", when the connection is completed. The
user should wait for this greeting message before sending any
commands. If the server is unable to accept input right away, a
120 "expected delay" reply should be sent immediately and a 220
reply when ready. The user will then know not to hang up if there
is a delay.

Spontaneous Replies

Sometimes "the system" spontaneously has a message to be sent
to a user (usually all users). For example, "System going down
in 15 minutes". There is no provision in FTP for such
spontaneous information to be sent from the server to the user.
It is recommended that such information be queued in the
server-PI and delivered to the user-PI in the next reply
(possibly making it a multi-line reply).

The table below lists alternative success and failure replies for
each command. These must be strictly adhered to; a server may
substitute text in the replies, but the meaning and action implied
by the code numbers and by the specific command reply sequence
cannot be altered.

Command-Reply Sequences

In this section, the command-reply sequence is presented. Each
command is listed with its possible replies; command groups are
listed together. Preliminary replies are listed first (with
their succeeding replies indented and under them), then
positive and negative completion, and finally intermediary




Postel & Reynolds [Page 49]




RFC 959 October 1985
File Transfer Protocol


replies with the remaining commands from the sequence
following. This listing forms the basis for the state
diagrams, which will be presented separately.

Connection Establishment
120
220
220
421
Login
USER
230
530
500, 501, 421
331, 332
PASS
230
202
530
500, 501, 503, 421
332
ACCT
230
202
530
500, 501, 503, 421
CWD
250
500, 501, 502, 421, 530, 550
CDUP
200
500, 501, 502, 421, 530, 550
SMNT
202, 250
500, 501, 502, 421, 530, 550
Logout
REIN
120
220
220
421
500, 502
QUIT
221
500




Postel & Reynolds [Page 50]




RFC 959 October 1985
File Transfer Protocol


Transfer parameters
PORT
200
500, 501, 421, 530
PASV
227
500, 501, 502, 421, 530
MODE
200
500, 501, 504, 421, 530
TYPE
200
500, 501, 504, 421, 530
STRU
200
500, 501, 504, 421, 530
File action commands
ALLO
200
202
500, 501, 504, 421, 530
REST
500, 501, 502, 421, 530
350
STOR
125, 150
(110)
226, 250
425, 426, 451, 551, 552
532, 450, 452, 553
500, 501, 421, 530
STOU
125, 150
(110)
226, 250
425, 426, 451, 551, 552
532, 450, 452, 553
500, 501, 421, 530
RETR
125, 150
(110)
226, 250
425, 426, 451
450, 550
500, 501, 421, 530




Postel & Reynolds [Page 51]




RFC 959 October 1985
File Transfer Protocol


LIST
125, 150
226, 250
425, 426, 451
450
500, 501, 502, 421, 530
NLST
125, 150
226, 250
425, 426, 451
450
500, 501, 502, 421, 530
APPE
125, 150
(110)
226, 250
425, 426, 451, 551, 552
532, 450, 550, 452, 553
500, 501, 502, 421, 530
RNFR
450, 550
500, 501, 502, 421, 530
350
RNTO
250
532, 553
500, 501, 502, 503, 421, 530
DELE
250
450, 550
500, 501, 502, 421, 530
RMD
250
500, 501, 502, 421, 530, 550
MKD
257
500, 501, 502, 421, 530, 550
PWD
257
500, 501, 502, 421, 550
ABOR
225, 226
500, 501, 502, 421






Postel & Reynolds [Page 52]




RFC 959 October 1985
File Transfer Protocol


Informational commands
SYST
215
500, 501, 502, 421
STAT
211, 212, 213
450
500, 501, 502, 421, 530
HELP
211, 214
500, 501, 502, 421
Miscellaneous commands
SITE
200
202
500, 501, 530
NOOP
200
500 421






























Postel & Reynolds [Page 53]

Wednesday, August 28th 2002 - 01:57:20 PM
what your parents call you: geo
what planet are you from??: geo
so i can reach you: geo
where am I???: magiclly appeared
whats a guestbook without a comment???:RFC 959 October 1985
File Transfer Protocol


DATA PORT (PORT)

The argument is a HOST-PORT specification for the data port
to be used in data connection. There are defaults for both
the user and server data ports, and under normal
circumstances this command and its reply are not needed. If
this command is used, the argument is the concatenation of a
32-bit internet host address and a 16-bit TCP port address.
This address information is broken into 8-bit fields and the
value of each field is transmitted as a decimal number (in
character string representation). The fields are separated
by commas. A port command would be:

PORT h1,h2,h3,h4,p1,p2

where h1 is the high order 8 bits of the internet host
address.

PASSIVE (PASV)

This command requests the server-DTP to "listen" on a data
port (which is not its default data port) and to wait for a
connection rather than initiate one upon receipt of a
transfer command. The response to this command includes the
host and port address this server is listening on.

REPRESENTATION TYPE (TYPE)

The argument specifies the representation type as described
in the Section on Data Representation and Storage. Several
types take a second parameter. The first parameter is
denoted by a single Telnet character, as is the second
Format parameter for ASCII and EBCDIC; the second parameter
for local byte is a decimal integer to indicate Bytesize.
The parameters are separated by a <SP> (Space, ASCII code
32).

The following codes are assigned for type:

\ /
A - ASCII | | N - Non-print
|-><-| T - Telnet format effectors
E - EBCDIC| | C - Carriage Control (ASA)
/ \
I - Image

L <byte size> - Local byte Byte size


Postel & Reynolds [Page 28]




RFC 959 October 1985
File Transfer Protocol


The default representation type is ASCII Non-print. If the
Format parameter is changed, and later just the first
argument is changed, Format then returns to the Non-print
default.

FILE STRUCTURE (STRU)

The argument is a single Telnet character code specifying
file structure described in the Section on Data
Representation and Storage.

The following codes are assigned for structure:

F - File (no record structure)
R - Record structure
P - Page structure

The default structure is File.

TRANSFER MODE (MODE)

The argument is a single Telnet character code specifying
the data transfer modes described in the Section on
Transmission Modes.

The following codes are assigned for transfer modes:

S - Stream
B - Block
C - Compressed

The default transfer mode is Stream.

4.1.3. FTP SERVICE COMMANDS

The FTP service commands define the file transfer or the file
system function requested by the user. The argument of an FTP
service command will normally be a pathname. The syntax of
pathnames must conform to server site conventions (with
standard defaults applicable), and the language conventions of
the control connection. The suggested default handling is to
use the last specified device, directory or file name, or the
standard default defined for local users. The commands may be
in any order except that a "rename from" command must be
followed by a "rename to" command and the restart command must
be followed by the interrupted service command (e.g., STOR or
RETR). The data, when transferred in response to FTP service


Postel & Reynolds [Page 29]




RFC 959 October 1985
File Transfer Protocol


commands, shall always be sent over the data connection, except
for certain informative replies. The following commands
specify FTP service requests:

RETRIEVE (RETR)

This command causes the server-DTP to transfer a copy of the
file, specified in the pathname, to the server- or user-DTP
at the other end of the data connection. The status and
contents of the file at the server site shall be unaffected.

STORE (STOR)

This command causes the server-DTP to accept the data
transferred via the data connection and to store the data as
a file at the server site. If the file specified in the
pathname exists at the server site, then its contents shall
be replaced by the data being transferred. A new file is
created at the server site if the file specified in the
pathname does not already exist.

STORE UNIQUE (STOU)

This command behaves like STOR except that the resultant
file is to be created in the current directory under a name
unique to that directory. The 250 Transfer Started response
must include the name generated.

APPEND (with create) (APPE)

This command causes the server-DTP to accept the data
transferred via the data connection and to store the data in
a file at the server site. If the file specified in the
pathname exists at the server site, then the data shall be
appended to that file; otherwise the file specified in the
pathname shall be created at the server site.

ALLOCATE (ALLO)

This command may be required by some servers to reserve
sufficient storage to accommodate the new file to be
transferred. The argument shall be a decimal integer
representing the number of bytes (using the logical byte
size) of storage to be reserved for the file. For files
sent with record or page structure a maximum record or page
size (in logical bytes) might also be necessary; this is
indicated by a decimal integer in a second argument field of


Postel & Reynolds [Page 30]




RFC 959 October 1985
File Transfer Protocol


the command. This second argument is optional, but when
present should be separated from the first by the three
Telnet characters <SP> R <SP>. This command shall be
followed by a STORe or APPEnd command. The ALLO command
should be treated as a NOOP (no operation) by those servers
which do not require that the maximum size of the file be
declared beforehand, and those servers interested in only
the maximum record or page size should accept a dummy value
in the first argument and ignore it.

RESTART (REST)

The argument field represents the server marker at which
file transfer is to be restarted. This command does not
cause file transfer but skips over the file to the specified
data checkpoint. This command shall be immediately followed
by the appropriate FTP service command which shall cause
file transfer to resume.

RENAME FROM (RNFR)

This command specifies the old pathname of the file which is
to be renamed. This command must be immediately followed by
a "rename to" command specifying the new file pathname.

RENAME TO (RNTO)

This command specifies the new pathname of the file
specified in the immediately preceding "rename from"
command. Together the two commands cause a file to be
renamed.

ABORT (ABOR)

This command tells the server to abort the previous FTP
service command and any associated transfer of data. The
abort command may require "special action", as discussed in
the Section on FTP Commands, to force recognition by the
server. No action is to be taken if the previous command
has been completed (including data transfer). The control
connection is not to be closed by the server, but the data
connection must be closed.

There are two cases for the server upon receipt of this
command: (1) the FTP service command was already completed,
or (2) the FTP service command is still in progress.



Postel & Reynolds [Page 31]




RFC 959 October 1985
File Transfer Protocol


In the first case, the server closes the data connection
(if it is open) and responds with a 226 reply, indicating
that the abort command was successfully processed.

In the second case, the server aborts the FTP service in
progress and closes the data connection, returning a 426
reply to indicate that the service request terminated
abnormally. The server then sends a 226 reply,
indicating that the abort command was successfully
processed.

DELETE (DELE)

This command causes the file specified in the pathname to be
deleted at the server site. If an extra level of protection
is desired (such as the query, "Do you really wish to
delete?"), it should be provided by the user-FTP process.

REMOVE DIRECTORY (RMD)

This command causes the directory specified in the pathname
to be removed as a directory (if the pathname is absolute)
or as a subdirectory of the current working directory (if
the pathname is relative). See Appendix II.

MAKE DIRECTORY (MKD)

This command causes the directory specified in the pathname
to be created as a directory (if the pathname is absolute)
or as a subdirectory of the current working directory (if
the pathname is relative). See Appendix II.

PRINT WORKING DIRECTORY (PWD)

This command causes the name of the current working
directory to be returned in the reply. See Appendix II.

LIST (LIST)

This command causes a list to be sent from the server to the
passive DTP. If the pathname specifies a directory or other
group of files, the server should transfer a list of files
in the specified directory. If the pathname specifies a
file then the server should send current information on the
file. A null argument implies the user's current working or
default directory. The data transfer is over the data
connection in type ASCII or type EBCDIC. (The user must


Postel & Reynolds [Page 32]




RFC 959 October 1985
File Transfer Protocol


ensure that the TYPE is appropriately ASCII or EBCDIC).
Since the information on a file may vary widely from system
to system, this information may be hard to use automatically
in a program, but may be quite useful to a human user.

NAME LIST (NLST)

This command causes a directory listing to be sent from
server to user site. The pathname should specify a
directory or other system-specific file group descriptor; a
null argument implies the current directory. The server
will return a stream of names of files and no other
information. The data will be transferred in ASCII or
EBCDIC type over the data connection as valid pathname
strings separated by <CRLF> or <NL>. (Again the user must
ensure that the TYPE is correct.) This command is intended
to return information that can be used by a program to
further process the files automatically. For example, in
the implementation of a "multiple get" function.

SITE PARAMETERS (SITE)

This command is used by the server to provide services
specific to his system that are essential to file transfer
but not sufficiently universal to be included as commands in
the protocol. The nature of these services and the
specification of their syntax can be stated in a reply to
the HELP SITE command.

SYSTEM (SYST)

This command is used to find out the type of operating
system at the server. The reply shall have as its first
word one of the system names listed in the current version
of the Assigned Numbers document [4].

STATUS (STAT)

This command shall cause a status response to be sent over
the control connection in the form of a reply. The command
may be sent during a file transfer (along with the Telnet IP
and Synch signals--see the Section on FTP Commands) in which
case the server will respond with the status of the
operation in progress, or it may be sent between file
transfers. In the latter case, the command may have an
argument field. If the argument is a pathname, the command
is analogous to the "list" command except that data shall be


Postel & Reynolds [Page 33]




RFC 959 October 1985
File Transfer Protocol


transferred over the control connection. If a partial
pathname is given, the server may respond with a list of
file names or attributes associated with that specification.
If no argument is given, the server should return general
status information about the server FTP process. This
should include current values of all transfer parameters and
the status of connections.

HELP (HELP)

This command shall cause the server to send helpful
information regarding its implementation status over the
control connection to the user. The command may take an
argument (e.g., any command name) and return more specific
information as a response. The reply is type 211 or 214.
It is suggested that HELP be allowed before entering a USER
command. The server may use this reply to specify
site-dependent parameters, e.g., in response to HELP SITE.

NOOP (NOOP)

This command does not affect any parameters or previously
entered commands. It specifies no action other than that the
server send an OK reply.

The File Transfer Protocol follows the specifications of the Telnet
protocol for all communications over the control connection. Since
the language used for Telnet communication may be a negotiated
option, all references in the next two sections will be to the
"Telnet language" and the corresponding "Telnet end-of-line code".
Currently, one may take these to mean NVT-ASCII and <CRLF>. No other
specifications of the Telnet protocol will be cited.

FTP commands are "Telnet strings" terminated by the "Telnet end of
line code". The command codes themselves are alphabetic characters
terminated by the character <SP> (Space) if parameters follow and
Telnet-EOL otherwise. The command codes and the semantics of
commands are described in this section; the detailed syntax of
commands is specified in the Section on Commands, the reply sequences
are discussed in the Section on Sequencing of Commands and Replies,
and scenarios illustrating the use of commands are provided in the
Section on Typical FTP Scenarios.

FTP commands may be partitioned as those specifying access-control
identifiers, data transfer parameters, or FTP service requests.
Certain commands (such as ABOR, STAT, QUIT) may be sent over the
control connection while a data transfer is in progress. Some


Postel & Reynolds [Page 34]




RFC 959 October 1985
File Transfer Protocol


servers may not be able to monitor the control and data connections
simultaneously, in which case some special action will be necessary
to get the server's attention. The following ordered format is
tentatively recommended:

1. User system inserts the Telnet "Interrupt Process" (IP) signal
in the Telnet stream.

2. User system sends the Telnet "Synch" signal.

3. User system inserts the command (e.g., ABOR) in the Telnet
stream.

4. Server PI, after receiving "IP", scans the Telnet stream for
EXACTLY ONE FTP command.

(For other servers this may not be necessary but the actions listed
above should have no unusual effect.)

4.2. FTP REPLIES

Replies to File Transfer Protocol commands are devised to ensure
the synchronization of requests and actions in the process of file
transfer, and to guarantee that the user process always knows the
state of the Server. Every command must generate at least one
reply, although there may be more than one; in the latter case,
the multiple replies must be easily distinguished. In addition,
some commands occur in sequential groups, such as USER, PASS and
ACCT, or RNFR and RNTO. The replies show the existence of an
intermediate state if all preceding commands have been successful.
A failure at any point in the sequence necessitates the repetition
of the entire sequence from the beginning.

The details of the command-reply sequence are made explicit in
a set of state diagrams below.

An FTP reply consists of a three digit number (transmitted as
three alphanumeric characters) followed by some text. The number
is intended for use by automata to determine what state to enter
next; the text is intended for the human user. It is intended
that the three digits contain enough encoded information that the
user-process (the User-PI) will not need to examine the text and
may either discard it or pass it on to the user, as appropriate.
In particular, the text may be server-dependent, so there are
likely to be varying texts for each reply code.

A reply is defined to contain the 3-digit code, followed by Space


Postel & Reynolds [Page 35]




RFC 959 October 1985
File Transfer Protocol


<SP>, followed by one line of text (where some maximum line length
has been specified), and terminated by the Telnet end-of-line
code. There will be cases however, where the text is longer than
a single line. In these cases the complete text must be bracketed
so the User-process knows when it may stop reading the reply (i.e.
stop processing input on the control connection) and go do other
things. This requires a special format on the first line to
indicate that more than one line is coming, and another on the
last line to designate it as the last. At least one of these must
contain the appropriate reply code to indicate the state of the
transaction. To satisfy all factions, it was decided that both
the first and last line codes should be the same.

Thus the format for multi-line replies is that the first line
will begin with the exact required reply code, followed
immediately by a Hyphen, "-" (also known as Minus), followed by
text. The last line will begin with the same code, followed
immediately by Space <SP>, optionally some text, and the Telnet
end-of-line code.

For example:
123-First line
Second line
234 A line beginning with numbers
123 The last line

The user-process then simply needs to search for the second
occurrence of the same reply code, followed by <SP> (Space), at
the beginning of a line, and ignore all intermediary lines. If
an intermediary line begins with a 3-digit number, the Server
must pad the front to avoid confusion.

This scheme allows standard system routines to be used for
reply information (such as for the STAT reply), with
"artificial" first and last lines tacked on. In rare cases
where these routines are able to generate three digits and a
Space at the beginning of any line, the beginning of each
text line should be offset by some neutral text, like Space.

This scheme assumes that multi-line replies may not be nested.

The three digits of the reply each have a special significance.
This is intended to allow a range of very simple to very
sophisticated responses by the user-process. The first digit
denotes whether the response is good, bad or incomplete.
(Referring to the state diagram), an unsophisticated user-process
will be able to determine its next action (proceed as planned,


Postel & Reynolds [Page 36]




RFC 959 October 1985
File Transfer Protocol


redo, retrench, etc.) by simply examining this first digit. A
user-process that wants to know approximately what kind of error
occurred (e.g. file system error, command syntax error) may
examine the second digit, reserving the third digit for the finest
gradation of information (e.g., RNTO command without a preceding
RNFR).

There are five values for the first digit of the reply code:

1yz Positive Preliminary reply

The requested action is being initiated; expect another
reply before proceeding with a new command. (The
user-process sending another command before the
completion reply would be in violation of protocol; but
server-FTP processes should queue any commands that
arrive while a preceding command is in progress.) This
type of reply can be used to indicate that the command
was accepted and the user-process may now pay attention
to the data connections, for implementations where
simultaneous monitoring is difficult. The server-FTP
process may send at most, one 1yz reply per command.

2yz Positive Completion reply

The requested action has been successfully completed. A
new request may be initiated.

3yz Positive Intermediate reply

The command has been accepted, but the requested action
is being held in abeyance, pending receipt of further
information. The user should send another command
specifying this information. This reply is used in
command sequence groups.

4yz Transient Negative Completion reply

The command was not accepted and the requested action did
not take place, but the error condition is temporary and
the action may be requested again. The user should
return to the beginning of the command sequence, if any.
It is difficult to assign a meaning to "transient",
particularly when two distinct sites (Server- and
User-processes) have to agree on the interpretation.
Each reply in the 4yz category might have a slightly
different time value, but the intent is that the


Postel & Reynolds [Page 37]




RFC 959 October 1985
File Transfer Protocol


user-process is encouraged to try again. A rule of thumb
in determining if a reply fits into the 4yz or the 5yz
(Permanent Negative) category is that replies are 4yz if
the commands can be repeated without any change in
command form or in properties of the User or Server
(e.g., the command is spelled the same with the same
arguments used; the user does not change his file access
or user name; the server does not put up a new
implementation.)

5yz Permanent Negative Completion reply

The command was not accepted and the requested action did
not take place. The User-process is discouraged from
repeating the exact request (in the same sequence). Even
some "permanent" error conditions can be corrected, so
the human user may want to direct his User-process to
reinitiate the command sequence by direct action at some
point in the future (e.g., after the spelling has been
changed, or the user has altered his directory status.)

The following function groupings are encoded in the second
digit:

x0z Syntax - These replies refer to syntax errors,
syntactically correct commands that don't fit any
functional category, unimplemented or superfluous
commands.

x1z Information - These are replies to requests for
information, such as status or help.

x2z Connections - Replies referring to the control and
data connections.

x3z Authentication and accounting - Replies for the login
process and accounting procedures.

x4z Unspecified as yet.

x5z File system - These replies indicate the status of the
Server file system vis-a-vis the requested transfer or
other file system action.

The third digit gives a finer gradation of meaning in each of
the function categories, specified by the second digit. The
list of replies below will illustrate this. Note that the text


Postel & Reynolds [Page 38]




RFC 959 October 1985
File Transfer Protocol


associated with each reply is recommended, rather than
mandatory, and may even change according to the command with
which it is associated. The reply codes, on the other hand,
must strictly follow the specifications in the last section;
that is, Server implementations should not invent new codes for
situations that are only slightly different from the ones
described here, but rather should adapt codes already defined.

A command such as TYPE or ALLO whose successful execution
does not offer the user-process any new information will
cause a 200 reply to be returned. If the command is not
implemented by a particular Server-FTP process because it
has no relevance to that computer system, for example ALLO
at a TOPS20 site, a Positive Completion reply is still
desired so that the simple User-process knows it can proceed
with its course of action. A 202 reply is used in this case
with, for example, the reply text: "No storage allocation
necessary." If, on the other hand, the command requests a
non-site-specific action and is unimplemented, the response
is 502. A refinement of that is the 504 reply for a command
that is implemented, but that requests an unimplemented
parameter.

4.2.1 Reply Codes by Function Groups

200 Command okay.
500 Syntax error, command unrecognized.
This may include errors such as command line too long.
501 Syntax error in parameters or arguments.
202 Command not implemented, superfluous at this site.
502 Command not implemented.
503 Bad sequence of commands.
504 Command not implemented for that parameter.
















Postel & Reynolds [Page 39]


Wednesday, August 28th 2002 - 01:54:00 PM
what your parents call you: geo
what planet are you from??: geo
so i can reach you: geo
where am I???: magiclly appeared
whats a guestbook without a comment???:RFC 959 October 1985
File Transfer Protocol


The following transmission modes are defined in FTP:

3.4.1. STREAM MODE

The data is transmitted as a stream of bytes. There is no
restriction on the representation type used; record structures
are allowed.

In a record structured file EOR and EOF will each be indicated
by a two-byte control code. The first byte of the control code
will be all ones, the escape character. The second byte will
have the low order bit on and zeros elsewhere for EOR and the
second low order bit on for EOF; that is, the byte will have
value 1 for EOR and value 2 for EOF. EOR and EOF may be
indicated together on the last byte transmitted by turning both
low order bits on (i.e., the value 3). If a byte of all ones
was intended to be sent as data, it should be repeated in the
second byte of the control code.

If the structure is a file structure, the EOF is indicated by
the sending host closing the data connection and all bytes are
data bytes.

3.4.2. BLOCK MODE

The file is transmitted as a series of data blocks preceded by
one or more header bytes. The header bytes contain a count
field, and descriptor code. The count field indicates the
total length of the data block in bytes, thus marking the
beginning of the next data block (there are no filler bits).
The descriptor code defines: last block in the file (EOF) last
block in the record (EOR), restart marker (see the Section on
Error Recovery and Restart) or suspect data (i.e., the data
being transferred is suspected of errors and is not reliable).
This last code is NOT intended for error control within FTP.
It is motivated by the desire of sites exchanging certain types
of data (e.g., seismic or weather data) to send and receive all
the data despite local errors (such as "magnetic tape read
errors"), but to indicate in the transmission that certain
portions are suspect). Record structures are allowed in this
mode, and any representation type may be used.

The header consists of the three bytes. Of the 24 bits of
header information, the 16 low order bits shall represent byte
count, and the 8 high order bits shall represent descriptor
codes as shown below.



Postel & Reynolds [Page 21]




RFC 959 October 1985
File Transfer Protocol


Block Header

+----------------+----------------+----------------+
| Descriptor | Byte Count |
| 8 bits | 16 bits |
+----------------+----------------+----------------+


The descriptor codes are indicated by bit flags in the
descriptor byte. Four codes have been assigned, where each
code number is the decimal value of the corresponding bit in
the byte.

Code Meaning

128 End of data block is EOR
64 End of data block is EOF
32 Suspected errors in data block
16 Data block is a restart marker

With this encoding, more than one descriptor coded condition
may exist for a particular block. As many bits as necessary
may be flagged.

The restart marker is embedded in the data stream as an
integral number of 8-bit bytes representing printable
characters in the language being used over the control
connection (e.g., default--NVT-ASCII). <SP> (Space, in the
appropriate language) must not be used WITHIN a restart marker.

For example, to transmit a six-character marker, the following
would be sent:

+--------+--------+--------+
|Descrptr| Byte count |
|code= 16| = 6 |
+--------+--------+--------+

+--------+--------+--------+
| Marker | Marker | Marker |
| 8 bits | 8 bits | 8 bits |
+--------+--------+--------+

+--------+--------+--------+
| Marker | Marker | Marker |
| 8 bits | 8 bits | 8 bits |
+--------+--------+--------+


Postel & Reynolds [Page 22]




RFC 959 October 1985
File Transfer Protocol


3.4.3. COMPRESSED MODE

There are three kinds of information to be sent: regular data,
sent in a byte string; compressed data, consisting of
replications or filler; and control information, sent in a
two-byte escape sequence. If n>0 bytes (up to 127) of regular
data are sent, these n bytes are preceded by a byte with the
left-most bit set to 0 and the right-most 7 bits containing the
number n.

Byte string:

1 7 8 8
+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
|0| n | | d(1) | ... | d(n) |
+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
^ ^
|---n bytes---|
of data

String of n data bytes d(1),..., d(n)
Count n must be positive.

To compress a string of n replications of the data byte d, the
following 2 bytes are sent:

Replicated Byte:

2 6 8
+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
|1 0| n | | d |
+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+

A string of n filler bytes can be compressed into a single
byte, where the filler byte varies with the representation
type. If the type is ASCII or EBCDIC the filler byte is <SP>
(Space, ASCII code 32, EBCDIC code 64). If the type is Image
or Local byte the filler is a zero byte.

Filler String:

2 6
+-+-+-+-+-+-+-+-+
|1 1| n |
+-+-+-+-+-+-+-+-+

The escape sequence is a double byte, the first of which is the


Postel & Reynolds [Page 23]




RFC 959 October 1985
File Transfer Protocol


escape byte (all zeros) and the second of which contains
descriptor codes as defined in Block mode. The descriptor
codes have the same meaning as in Block mode and apply to the
succeeding string of bytes.

Compressed mode is useful for obtaining increased bandwidth on
very large network transmissions at a little extra CPU cost.
It can be most effectively used to reduce the size of printer
files such as those generated by RJE hosts.

3.5. ERROR RECOVERY AND RESTART

There is no provision for detecting bits lost or scrambled in data
transfer; this level of error control is handled by the TCP.
However, a restart procedure is provided to protect users from
gross system failures (including failures of a host, an
FTP-process, or the underlying network).

The restart procedure is defined only for the block and compressed
modes of data transfer. It requires the sender of data to insert
a special marker code in the data stream with some marker
information. The marker information has meaning only to the
sender, but must consist of printable characters in the default or
negotiated language of the control connection (ASCII or EBCDIC).
The marker could represent a bit-count, a record-count, or any
other information by which a system may identify a data
checkpoint. The receiver of data, if it implements the restart
procedure, would then mark the corresponding position of this
marker in the receiving system, and return this information to the
user.

In the event of a system failure, the user can restart the data
transfer by identifying the marker point with the FTP restart
procedure. The following example illustrates the use of the
restart procedure.

The sender of the data inserts an appropriate marker block in the
data stream at a convenient point. The receiving host marks the
corresponding data point in its file system and conveys the last
known sender and receiver marker information to the user, either
directly or over the control connection in a 110 reply (depending
on who is the sender). In the event of a system failure, the user
or controller process restarts the server at the last server
marker by sending a restart command with server's marker code as
its argument. The restart command is transmitted over the control




Postel & Reynolds [Page 24]




RFC 959 October 1985
File Transfer Protocol


connection and is immediately followed by the command (such as
RETR, STOR or LIST) which was being executed when the system
failure occurred.

4. FILE TRANSFER FUNCTIONS

The communication channel from the user-PI to the server-PI is
established as a TCP connection from the user to the standard server
port. The user protocol interpreter is responsible for sending FTP
commands and interpreting the replies received; the server-PI
interprets commands, sends replies and directs its DTP to set up the
data connection and transfer the data. If the second party to the
data transfer (the passive transfer process) is the user-DTP, then it
is governed through the internal protocol of the user-FTP host; if it
is a second server-DTP, then it is governed by its PI on command from
the user-PI. The FTP replies are discussed in the next section. In
the description of a few of the commands in this section, it is
helpful to be explicit about the possible replies.

4.1. FTP COMMANDS

4.1.1. ACCESS CONTROL COMMANDS

The following commands specify access control identifiers
(command codes are shown in parentheses).

USER NAME (USER)

The argument field is a Telnet string identifying the user.
The user identification is that which is required by the
server for access to its file system. This command will
normally be the first command transmitted by the user after
the control connections are made (some servers may require
this). Additional identification information in the form of
a password and/or an account command may also be required by
some servers. Servers may allow a new USER command to be
entered at any point in order to change the access control
and/or accounting information. This has the effect of
flushing any user, password, and account information already
supplied and beginning the login sequence again. All
transfer parameters are unchanged and any file transfer in
progress is completed under the old access control
parameters.






Postel & Reynolds [Page 25]




RFC 959 October 1985
File Transfer Protocol


PASSWORD (PASS)

The argument field is a Telnet string specifying the user's
password. This command must be immediately preceded by the
user name command, and, for some sites, completes the user's
identification for access control. Since password
information is quite sensitive, it is desirable in general
to "mask" it or suppress typeout. It appears that the
server has no foolproof way to achieve this. It is
therefore the responsibility of the user-FTP process to hide
the sensitive password information.

ACCOUNT (ACCT)

The argument field is a Telnet string identifying the user's
account. The command is not necessarily related to the USER
command, as some sites may require an account for login and
others only for specific access, such as storing files. In
the latter case the command may arrive at any time.

There are reply codes to differentiate these cases for the
automation: when account information is required for login,
the response to a successful PASSword command is reply code
332. On the other hand, if account information is NOT
required for login, the reply to a successful PASSword
command is 230; and if the account information is needed for
a command issued later in the dialogue, the server should
return a 332 or 532 reply depending on whether it stores
(pending receipt of the ACCounT command) or discards the
command, respectively.

CHANGE WORKING DIRECTORY (CWD)

This command allows the user to work with a different
directory or dataset for file storage or retrieval without
altering his login or accounting information. Transfer
parameters are similarly unchanged. The argument is a
pathname specifying a directory or other system dependent
file group designator.

CHANGE TO PARENT DIRECTORY (CDUP)

This command is a special case of CWD, and is included to
simplify the implementation of programs for transferring
directory trees between operating systems having different




Postel & Reynolds [Page 26]




RFC 959 October 1985
File Transfer Protocol


syntaxes for naming the parent directory. The reply codes
shall be identical to the reply codes of CWD. See
Appendix II for further details.

STRUCTURE MOUNT (SMNT)

This command allows the user to mount a different file
system data structure without altering his login or
accounting information. Transfer parameters are similarly
unchanged. The argument is a pathname specifying a
directory or other system dependent file group designator.

REINITIALIZE (REIN)

This command terminates a USER, flushing all I/O and account
information, except to allow any transfer in progress to be
completed. All parameters are reset to the default settings
and the control connection is left open. This is identical
to the state in which a user finds himself immediately after
the control connection is opened. A USER command may be
expected to follow.

LOGOUT (QUIT)

This command terminates a USER and if file transfer is not
in progress, the server closes the control connection. If
file transfer is in progress, the connection will remain
open for result response and the server will then close it.
If the user-process is transferring files for several USERs
but does not wish to close and then reopen connections for
each, then the REIN command should be used instead of QUIT.

An unexpected close on the control connection will cause the
server to take the effective action of an abort (ABOR) and a
logout (QUIT).

4.1.2. TRANSFER PARAMETER COMMANDS

All data transfer parameters have default values, and the
commands specifying data transfer parameters are required only
if the default parameter values are to be changed. The default
value is the last specified value, or if no value has been
specified, the standard default value is as stated here. This
implies that the server must "remember" the applicable default
values. The commands may be in any order except that they must
precede the FTP service request. The following commands
specify data transfer parameters:


Postel & Reynolds [Page 27]

Wednesday, August 28th 2002 - 01:51:04 PM
what your parents call you: geo
what planet are you from??: geo
so i can reach you: geo
where am I???: magiclly appeared
whats a guestbook without a comment???:RFC 959 October 1985
File Transfer Protocol


3.1.2. DATA STRUCTURES

In addition to different representation types, FTP allows the
structure of a file to be specified. Three file structures are
defined in FTP:

file-structure, where there is no internal structure and
the file is considered to be a
continuous sequence of data bytes,

record-structure, where the file is made up of sequential
records,

and page-structure, where the file is made up of independent
indexed pages.

File-structure is the default to be assumed if the STRUcture
command has not been used but both file and record structures
must be accepted for "text" files (i.e., files with TYPE ASCII
or EBCDIC) by all FTP implementations. The structure of a file
will affect both the transfer mode of a file (see the Section
on Transmission Modes) and the interpretation and storage of
the file.

The "natural" structure of a file will depend on which host
stores the file. A source-code file will usually be stored on
an IBM Mainframe in fixed length records but on a DEC TOPS-20
as a stream of characters partitioned into lines, for example
by <CRLF>. If the transfer of files between such disparate
sites is to be useful, there must be some way for one site to
recognize the other's assumptions about the file.

With some sites being naturally file-oriented and others
naturally record-oriented there may be problems if a file with
one structure is sent to a host oriented to the other. If a
text file is sent with record-structure to a host which is file
oriented, then that host should apply an internal
transformation to the file based on the record structure.
Obviously, this transformation should be useful, but it must
also be invertible so that an identical file may be retrieved
using record structure.

In the case of a file being sent with file-structure to a
record-oriented host, there exists the question of what
criteria the host should use to divide the file into records
which can be processed locally. If this division is necessary,
the FTP implementation should use the end-of-line sequence,


Postel & Reynolds [Page 15]




RFC 959 October 1985
File Transfer Protocol


<CRLF> for ASCII, or <NL> for EBCDIC text files, as the
delimiter. If an FTP implementation adopts this technique, it
must be prepared to reverse the transformation if the file is
retrieved with file-structure.

3.1.2.1. FILE STRUCTURE

File structure is the default to be assumed if the STRUcture
command has not been used.

In file-structure there is no internal structure and the
file is considered to be a continuous sequence of data
bytes.

3.1.2.2. RECORD STRUCTURE

Record structures must be accepted for "text" files (i.e.,
files with TYPE ASCII or EBCDIC) by all FTP implementations.

In record-structure the file is made up of sequential
records.

3.1.2.3. PAGE STRUCTURE

To transmit files that are discontinuous, FTP defines a page
structure. Files of this type are sometimes known as
"random access files" or even as "holey files". In these
files there is sometimes other information associated with
the file as a whole (e.g., a file descriptor), or with a
section of the file (e.g., page access controls), or both.
In FTP, the sections of the file are called pages.

To provide for various page sizes and associated
information, each page is sent with a page header. The page
header has the following defined fields:

Header Length

The number of logical bytes in the page header
including this byte. The minimum header length is 4.

Page Index

The logical page number of this section of the file.
This is not the transmission sequence number of this
page, but the index used to identify this page of the
file.


Postel & Reynolds [Page 16]




RFC 959 October 1985
File Transfer Protocol


Data Length

The number of logical bytes in the page data. The
minimum data length is 0.

Page Type

The type of page this is. The following page types
are defined:

0 = Last Page

This is used to indicate the end of a paged
structured transmission. The header length must
be 4, and the data length must be 0.

1 = Simple Page

This is the normal type for simple paged files
with no page level associated control
information. The header length must be 4.

2 = Descriptor Page

This type is used to transmit the descriptive
information for the file as a whole.

3 = Access Controlled Page

This type includes an additional header field
for paged files with page level access control
information. The header length must be 5.

Optional Fields

Further header fields may be used to supply per page
control information, for example, per page access
control.

All fields are one logical byte in length. The logical byte
size is specified by the TYPE command. See Appendix I for
further details and a specific case at the page structure.

A note of caution about parameters: a file must be stored and
retrieved with the same parameters if the retrieved version is to




Postel & Reynolds [Page 17]




RFC 959 October 1985
File Transfer Protocol


be identical to the version originally transmitted. Conversely,
FTP implementations must return a file identical to the original
if the parameters used to store and retrieve a file are the same.

3.2. ESTABLISHING DATA CONNECTIONS

The mechanics of transferring data consists of setting up the data
connection to the appropriate ports and choosing the parameters
for transfer. Both the user and the server-DTPs have a default
data port. The user-process default data port is the same as the
control connection port (i.e., U). The server-process default
data port is the port adjacent to the control connection port
(i.e., L-1).

The transfer byte size is 8-bit bytes. This byte size is relevant
only for the actual transfer of the data; it has no bearing on
representation of the data within a host's file system.

The passive data transfer process (this may be a user-DTP or a
second server-DTP) shall "listen" on the data port prior to
sending a transfer request command. The FTP request command
determines the direction of the data transfer. The server, upon
receiving the transfer request, will initiate the data connection
to the port. When the connection is established, the data
transfer begins between DTP's, and the server-PI sends a
confirming reply to the user-PI.

Every FTP implementation must support the use of the default data
ports, and only the USER-PI can initiate a change to non-default
ports.

It is possible for the user to specify an alternate data port by
use of the PORT command. The user may want a file dumped on a TAC
line printer or retrieved from a third party host. In the latter
case, the user-PI sets up control connections with both
server-PI's. One server is then told (by an FTP command) to
"listen" for a connection which the other will initiate. The
user-PI sends one server-PI a PORT command indicating the data
port of the other. Finally, both are sent the appropriate
transfer commands. The exact sequence of commands and replies
sent between the user-controller and the servers is defined in the
Section on FTP Replies.

In general, it is the server's responsibility to maintain the data
connection--to initiate it and to close it. The exception to this




Postel & Reynolds [Page 18]




RFC 959 October 1985
File Transfer Protocol


is when the user-DTP is sending the data in a transfer mode that
requires the connection to be closed to indicate EOF. The server
MUST close the data connection under the following conditions:

1. The server has completed sending data in a transfer mode
that requires a close to indicate EOF.

2. The server receives an ABORT command from the user.

3. The port specification is changed by a command from the
user.

4. The control connection is closed legally or otherwise.

5. An irrecoverable error condition occurs.

Otherwise the close is a server option, the exercise of which the
server must indicate to the user-process by either a 250 or 226
reply only.

3.3. DATA CONNECTION MANAGEMENT

Default Data Connection Ports: All FTP implementations must
support use of the default data connection ports, and only the
User-PI may initiate the use of non-default ports.

Negotiating Non-Default Data Ports: The User-PI may specify a
non-default user side data port with the PORT command. The
User-PI may request the server side to identify a non-default
server side data port with the PASV command. Since a connection
is defined by the pair of addresses, either of these actions is
enough to get a different data connection, still it is permitted
to do both commands to use new ports on both ends of the data
connection.

Reuse of the Data Connection: When using the stream mode of data
transfer the end of the file must be indicated by closing the
connection. This causes a problem if multiple files are to be
transfered in the session, due to need for TCP to hold the
connection record for a time out period to guarantee the reliable
communication. Thus the connection can not be reopened at once.

There are two solutions to this problem. The first is to
negotiate a non-default port. The second is to use another
transfer mode.

A comment on transfer modes. The stream transfer mode is


Postel & Reynolds [Page 19]




RFC 959 October 1985
File Transfer Protocol


inherently unreliable, since one can not determine if the
connection closed prematurely or not. The other transfer modes
(Block, Compressed) do not close the connection to indicate the
end of file. They have enough FTP encoding that the data
connection can be parsed to determine the end of the file.
Thus using these modes one can leave the data connection open
for multiple file transfers.

3.4. TRANSMISSION MODES

The next consideration in transferring data is choosing the
appropriate transmission mode. There are three modes: one which
formats the data and allows for restart procedures; one which also
compresses the data for efficient transfer; and one which passes
the data with little or no processing. In this last case the mode
interacts with the structure attribute to determine the type of
processing. In the compressed mode, the representation type
determines the filler byte.

All data transfers must be completed with an end-of-file (EOF)
which may be explicitly stated or implied by the closing of the
data connection. For files with record structure, all the
end-of-record markers (EOR) are explicit, including the final one.
For files transmitted in page structure a "last-page" page type is
used.

NOTE: In the rest of this section, byte means "transfer byte"
except where explicitly stated otherwise.

For the purpose of standardized transfer, the sending host will
translate its internal end of line or end of record denotation
into the representation prescribed by the transfer mode and file
structure, and the receiving host will perform the inverse
translation to its internal denotation. An IBM Mainframe record
count field may not be recognized at another host, so the
end-of-record information may be transferred as a two byte control
code in Stream mode or as a flagged bit in a Block or Compressed
mode descriptor. End-of-line in an ASCII or EBCDIC file with no
record structure should be indicated by <CRLF> or <NL>,
respectively. Since these transformations imply extra work for
some systems, identical systems transferring non-record structured
text files might wish to use a binary representation and stream
mode for the transfer.






Postel & Reynolds [Page 20]

Wednesday, August 28th 2002 - 01:48:04 PM
what your parents call you: geo
what planet are you from??: geo
so i can reach you: geo
where am I???: magiclly appeared
whats a guestbook without a comment???:RFC 959 October 1985
File Transfer Protocol


the same host that initiates the FTP commands via the control
connection, but the user or the user-FTP process must ensure a
"listen" on the specified data port. It ought to also be noted
that the data connection may be used for simultaneous sending and
receiving.

In another situation a user might wish to transfer files between
two hosts, neither of which is a local host. The user sets up
control connections to the two servers and then arranges for a
data connection between them. In this manner, control information
is passed to the user-PI but data is transferred between the
server data transfer processes. Following is a model of this
server-server interaction.


Control ------------ Control
---------->| User-FTP |<-----------
| | User-PI | |
| | "C" | |
V ------------ V
-------------- --------------
| Server-FTP | Data Connection | Server-FTP |
| "A" |<---------------------->| "B" |
-------------- Port (A) Port (B) --------------


Figure 2

The protocol requires that the control connections be open while
data transfer is in progress. It is the responsibility of the
user to request the closing of the control connections when
finished using the FTP service, while it is the server who takes
the action. The server may abort data transfer if the control
connections are closed without command.

The Relationship between FTP and Telnet:

The FTP uses the Telnet protocol on the control connection.
This can be achieved in two ways: first, the user-PI or the
server-PI may implement the rules of the Telnet Protocol
directly in their own procedures; or, second, the user-PI or
the server-PI may make use of the existing Telnet module in the
system.

Ease of implementaion, sharing code, and modular programming
argue for the second approach. Efficiency and independence



Postel & Reynolds [Page 9]




RFC 959 October 1985
File Transfer Protocol


argue for the first approach. In practice, FTP relies on very
little of the Telnet Protocol, so the first approach does not
necessarily involve a large amount of code.

3. DATA TRANSFER FUNCTIONS

Files are transferred only via the data connection. The control
connection is used for the transfer of commands, which describe the
functions to be performed, and the replies to these commands (see the
Section on FTP Replies). Several commands are concerned with the
transfer of data between hosts. These data transfer commands include
the MODE command which specify how the bits of the data are to be
transmitted, and the STRUcture and TYPE commands, which are used to
define the way in which the data are to be represented. The
transmission and representation are basically independent but the
"Stream" transmission mode is dependent on the file structure
attribute and if "Compressed" transmission mode is used, the nature
of the filler byte depends on the representation type.

3.1. DATA REPRESENTATION AND STORAGE

Data is transferred from a storage device in the sending host to a
storage device in the receiving host. Often it is necessary to
perform certain transformations on the data because data storage
representations in the two systems are different. For example,
NVT-ASCII has different data storage representations in different
systems. DEC TOPS-20s's generally store NVT-ASCII as five 7-bit
ASCII characters, left-justified in a 36-bit word. IBM Mainframe's
store NVT-ASCII as 8-bit EBCDIC codes. Multics stores NVT-ASCII
as four 9-bit characters in a 36-bit word. It is desirable to
convert characters into the standard NVT-ASCII representation when
transmitting text between dissimilar systems. The sending and
receiving sites would have to perform the necessary
transformations between the standard representation and their
internal representations.

A different problem in representation arises when transmitting
binary data (not character codes) between host systems with
different word lengths. It is not always clear how the sender
should send data, and the receiver store it. For example, when
transmitting 32-bit bytes from a 32-bit word-length system to a
36-bit word-length system, it may be desirable (for reasons of
efficiency and usefulness) to store the 32-bit bytes
right-justified in a 36-bit word in the latter system. In any
case, the user should have the option of specifying data
representation and transformation functions. It should be noted



Postel & Reynolds [Page 10]




RFC 959 October 1985
File Transfer Protocol


that FTP provides for very limited data type representations.
Transformations desired beyond this limited capability should be
performed by the user directly.

3.1.1. DATA TYPES

Data representations are handled in FTP by a user specifying a
representation type. This type may implicitly (as in ASCII or
EBCDIC) or explicitly (as in Local byte) define a byte size for
interpretation which is referred to as the "logical byte size."
Note that this has nothing to do with the byte size used for
transmission over the data connection, called the "transfer
byte size", and the two should not be confused. For example,
NVT-ASCII has a logical byte size of 8 bits. If the type is
Local byte, then the TYPE command has an obligatory second
parameter specifying the logical byte size. The transfer byte
size is always 8 bits.

3.1.1.1. ASCII TYPE

This is the default type and must be accepted by all FTP
implementations. It is intended primarily for the transfer
of text files, except when both hosts would find the EBCDIC
type more convenient.

The sender converts the data from an internal character
representation to the standard 8-bit NVT-ASCII
representation (see the Telnet specification). The receiver
will convert the data from the standard form to his own
internal form.

In accordance with the NVT standard, the <CRLF> sequence
should be used where necessary to denote the end of a line
of text. (See the discussion of file structure at the end
of the Section on Data Representation and Storage.)

Using the standard NVT-ASCII representation means that data
must be interpreted as 8-bit bytes.

The Format parameter for ASCII and EBCDIC types is discussed
below.








Postel & Reynolds [Page 11]




RFC 959 October 1985
File Transfer Protocol


3.1.1.2. EBCDIC TYPE

This type is intended for efficient transfer between hosts
which use EBCDIC for their internal character
representation.

For transmission, the data are represented as 8-bit EBCDIC
characters. The character code is the only difference
between the functional specifications of EBCDIC and ASCII
types.

End-of-line (as opposed to end-of-record--see the discussion
of structure) will probably be rarely used with EBCDIC type
for purposes of denoting structure, but where it is
necessary the <NL> character should be used.

3.1.1.3. IMAGE TYPE

The data are sent as contiguous bits which, for transfer,
are packed into the 8-bit transfer bytes. The receiving
site must store the data as contiguous bits. The structure
of the storage system might necessitate the padding of the
file (or of each record, for a record-structured file) to
some convenient boundary (byte, word or block). This
padding, which must be all zeros, may occur only at the end
of the file (or at the end of each record) and there must be
a way of identifying the padding bits so that they may be
stripped off if the file is retrieved. The padding
transformation should be well publicized to enable a user to
process a file at the storage site.

Image type is intended for the efficient storage and
retrieval of files and for the transfer of binary data. It
is recommended that this type be accepted by all FTP
implementations.

3.1.1.4. LOCAL TYPE

The data is transferred in logical bytes of the size
specified by the obligatory second parameter, Byte size.
The value of Byte size must be a decimal integer; there is
no default value. The logical byte size is not necessarily
the same as the transfer byte size. If there is a
difference in byte sizes, then the logical bytes should be
packed contiguously, disregarding transfer byte boundaries
and with any necessary padding at the end.



Postel & Reynolds [Page 12]




RFC 959 October 1985
File Transfer Protocol


When the data reaches the receiving host, it will be
transformed in a manner dependent on the logical byte size
and the particular host. This transformation must be
invertible (i.e., an identical file can be retrieved if the
same parameters are used) and should be well publicized by
the FTP implementors.

For example, a user sending 36-bit floating-point numbers to
a host with a 32-bit word could send that data as Local byte
with a logical byte size of 36. The receiving host would
then be expected to store the logical bytes so that they
could be easily manipulated; in this example putting the
36-bit logical bytes into 64-bit double words should
suffice.

In another example, a pair of hosts with a 36-bit word size
may send data to one another in words by using TYPE L 36.
The data would be sent in the 8-bit transmission bytes
packed so that 9 transmission bytes carried two host words.

3.1.1.5. FORMAT CONTROL

The types ASCII and EBCDIC also take a second (optional)
parameter; this is to indicate what kind of vertical format
control, if any, is associated with a file. The following
data representation types are defined in FTP:

A character file may be transferred to a host for one of
three purposes: for printing, for storage and later
retrieval, or for processing. If a file is sent for
printing, the receiving host must know how the vertical
format control is represented. In the second case, it must
be possible to store a file at a host and then retrieve it
later in exactly the same form. Finally, it should be
possible to move a file from one host to another and process
the file at the second host without undue trouble. A single
ASCII or EBCDIC format does not satisfy all these
conditions. Therefore, these types have a second parameter
specifying one of the following three formats:

3.1.1.5.1. NON PRINT

This is the default format to be used if the second
(format) parameter is omitted. Non-print format must be
accepted by all FTP implementations.




Postel & Reynolds [Page 13]




RFC 959 October 1985
File Transfer Protocol


The file need contain no vertical format information. If
it is passed to a printer process, this process may
assume standard values for spacing and margins.

Normally, this format will be used with files destined
for processing or just storage.

3.1.1.5.2. TELNET FORMAT CONTROLS

The file contains ASCII/EBCDIC vertical format controls
(i.e., <CR>, <LF>, <NL>, <VT>, <FF>) which the printer
process will interpret appropriately. <CRLF>, in exactly
this sequence, also denotes end-of-line.

3.1.1.5.2. CARRIAGE CONTROL (ASA)

The file contains ASA (FORTRAN) vertical format control
characters. (See RFC 740 Appendix C; and Communications
of the ACM, Vol. 7, No. 10, p. 606, October 1964.) In a
line or a record formatted according to the ASA Standard,
the first character is not to be printed. Instead, it
should be used to determine the vertical movement of the
paper which should take place before the rest of the
record is printed.

The ASA Standard specifies the following control
characters:

Character Vertical Spacing

blank Move paper up one line
0 Move paper up two lines
1 Move paper to top of next page
+ No movement, i.e., overprint

Clearly there must be some way for a printer process to
distinguish the end of the structural entity. If a file
has record structure (see below) this is no problem;
records will be explicitly marked during transfer and
storage. If the file has no record structure, the <CRLF>
end-of-line sequence is used to separate printing lines,
but these format effectors are overridden by the ASA
controls.






Postel & Reynolds [Page 14]

Wednesday, August 28th 2002 - 01:44:52 PM
what your parents call you: geo
what planet are you from??: geo
so i can reach you: geo
where am I???: magiclly appeared
whats a guestbook without a comment???:RFC 959 October 1985
File Transfer Protocol


In particular, the following new optional commands are included in
this edition of the specification:

CDUP - Change to Parent Directory

SMNT - Structure Mount

STOU - Store Unique

RMD - Remove Directory

MKD - Make Directory

PWD - Print Directory

SYST - System

This specification is compatible with the previous edition. A
program implemented in conformance to the previous specification
should automatically be in conformance to this specification.

2.2. TERMINOLOGY

ASCII

The ASCII character set is as defined in the ARPA-Internet
Protocol Handbook. In FTP, ASCII characters are defined to be
the lower half of an eight-bit code set (i.e., the most
significant bit is zero).

access controls

Access controls define users' access privileges to the use of a
system, and to the files in that system. Access controls are
necessary to prevent unauthorized or accidental use of files.
It is the prerogative of a server-FTP process to invoke access
controls.

byte size

There are two byte sizes of interest in FTP: the logical byte
size of the file, and the transfer byte size used for the
transmission of the data. The transfer byte size is always 8
bits. The transfer byte size is not necessarily the byte size
in which data is to be stored in a system, nor the logical byte
size for interpretation of the structure of the data.



Postel & Reynolds [Page 3]




RFC 959 October 1985
File Transfer Protocol


control connection

The communication path between the USER-PI and SERVER-PI for
the exchange of commands and replies. This connection follows
the Telnet Protocol.

data connection

A full duplex connection over which data is transferred, in a
specified mode and type. The data transferred may be a part of
a file, an entire file or a number of files. The path may be
between a server-DTP and a user-DTP, or between two
server-DTPs.

data port

The passive data transfer process "listens" on the data port
for a connection from the active transfer process in order to
open the data connection.

DTP

The data transfer process establishes and manages the data
connection. The DTP can be passive or active.

End-of-Line

The end-of-line sequence defines the separation of printing
lines. The sequence is Carriage Return, followed by Line Feed.

EOF

The end-of-file condition that defines the end of a file being
transferred.

EOR

The end-of-record condition that defines the end of a record
being transferred.

error recovery

A procedure that allows a user to recover from certain errors
such as failure of either host system or transfer process. In
FTP, error recovery may involve restarting a file transfer at a
given checkpoint.



Postel & Reynolds [Page 4]




RFC 959 October 1985
File Transfer Protocol


FTP commands

A set of commands that comprise the control information flowing
from the user-FTP to the server-FTP process.

file

An ordered set of computer data (including programs), of
arbitrary length, uniquely identified by a pathname.

mode

The mode in which data is to be transferred via the data
connection. The mode defines the data format during transfer
including EOR and EOF. The transfer modes defined in FTP are
described in the Section on Transmission Modes.

NVT

The Network Virtual Terminal as defined in the Telnet Protocol.

NVFS

The Network Virtual File System. A concept which defines a
standard network file system with standard commands and
pathname conventions.

page

A file may be structured as a set of independent parts called
pages. FTP supports the transmission of discontinuous files as
independent indexed pages.

pathname

Pathname is defined to be the character string which must be
input to a file system by a user in order to identify a file.
Pathname normally contains device and/or directory names, and
file name specification. FTP does not yet specify a standard
pathname convention. Each user must follow the file naming
conventions of the file systems involved in the transfer.

PI

The protocol interpreter. The user and server sides of the
protocol have distinct roles implemented in a user-PI and a
server-PI.


Postel & Reynolds [Page 5]




RFC 959 October 1985
File Transfer Protocol


record

A sequential file may be structured as a number of contiguous
parts called records. Record structures are supported by FTP
but a file need not have record structure.

reply

A reply is an acknowledgment (positive or negative) sent from
server to user via the control connection in response to FTP
commands. The general form of a reply is a completion code
(including error codes) followed by a text string. The codes
are for use by programs and the text is usually intended for
human users.

server-DTP

The data transfer process, in its normal "active" state,
establishes the data connection with the "listening" data port.
It sets up parameters for transfer and storage, and transfers
data on command from its PI. The DTP can be placed in a
"passive" state to listen for, rather than initiate a
connection on the data port.

server-FTP process

A process or set of processes which perform the function of
file transfer in cooperation with a user-FTP process and,
possibly, another server. The functions consist of a protocol
interpreter (PI) and a data transfer process (DTP).

server-PI

The server protocol interpreter "listens" on Port L for a
connection from a user-PI and establishes a control
communication connection. It receives standard FTP commands
from the user-PI, sends replies, and governs the server-DTP.

type

The data representation type used for data transfer and
storage. Type implies certain transformations between the time
of data storage and data transfer. The representation types
defined in FTP are described in the Section on Establishing
Data Connections.




Postel & Reynolds [Page 6]




RFC 959 October 1985
File Transfer Protocol


user

A person or a process on behalf of a person wishing to obtain
file transfer service. The human user may interact directly
with a server-FTP process, but use of a user-FTP process is
preferred since the protocol design is weighted towards
automata.

user-DTP

The data transfer process "listens" on the data port for a
connection from a server-FTP process. If two servers are
transferring data between them, the user-DTP is inactive.

user-FTP process

A set of functions including a protocol interpreter, a data
transfer process and a user interface which together perform
the function of file transfer in cooperation with one or more
server-FTP processes. The user interface allows a local
language to be used in the command-reply dialogue with the
user.

user-PI

The user protocol interpreter initiates the control connection
from its port U to the server-FTP process, initiates FTP
commands, and governs the user-DTP if that process is part of
the file transfer.




















Postel & Reynolds [Page 7]




RFC 959 October 1985
File Transfer Protocol


2.3. THE FTP MODEL

With the above definitions in mind, the following model (shown in
Figure 1) may be diagrammed for an FTP service.

-------------
|/---------\|
|| User || --------
||Interface|<--->| User |
|\----^----/| --------
---------- | | |
|/------\| FTP Commands |/----V----\|
||Server|<---------------->| User ||
|| PI || FTP Replies || PI ||
|\--^---/| |\----^----/|
| | | | | |
-------- |/--V---\| Data |/----V----\| --------
| File |<--->|Server|<---------------->| User |<--->| File |
|System| || DTP || Connection || DTP || |System|
-------- |\------/| |\---------/| --------
---------- -------------

Server-FTP USER-FTP

NOTES: 1. The data connection may be used in either direction.
2. The data connection need not exist all of the time.

Figure 1 Model for FTP Use

In the model described in Figure 1, the user-protocol interpreter
initiates the control connection. The control connection follows
the Telnet protocol. At the initiation of the user, standard FTP
commands are generated by the user-PI and transmitted to the
server process via the control connection. (The user may
establish a direct control connection to the server-FTP, from a
TAC terminal for example, and generate standard FTP commands
independently, bypassing the user-FTP process.) Standard replies
are sent from the server-PI to the user-PI over the control
connection in response to the commands.

The FTP commands specify the parameters for the data connection
(data port, transfer mode, representation type, and structure) and
the nature of file system operation (store, retrieve, append,
delete, etc.). The user-DTP or its designate should "listen" on
the specified data port, and the server initiate the data
connection and data transfer in accordance with the specified
parameters. It should be noted that the data port need not be in


Postel & Reynolds [Page 8]

Wednesday, August 28th 2002 - 01:38:47 PM
what your parents call you: geo
what planet are you from??: geo
so i can reach you: geo
where am I???: magiclly appeared
whats a guestbook without a comment???:
Network Working Group J. Postel
Request for Comments: 959 J. Reynolds
ISI
Obsoletes RFC: 765 (IEN 149) October 1985

FILE TRANSFER PROTOCOL (FTP)


Status of this Memo

This memo is the official specification of the File Transfer
Protocol (FTP). Distribution of this memo is unlimited.

The following new optional commands are included in this edition of
the specification:

CDUP (Change to Parent Directory), SMNT (Structure Mount), STOU
(Store Unique), RMD (Remove Directory), MKD (Make Directory), PWD
(Print Directory), and SYST (System).

Note that this specification is compatible with the previous edition.

1. INTRODUCTION

The objectives of FTP are 1) to promote sharing of files (computer
programs and/or data), 2) to encourage indirect or implicit (via
programs) use of remote computers, 3) to shield a user from
variations in file storage systems among hosts, and 4) to transfer
data reliably and efficiently. FTP, though usable directly by a user
at a terminal, is designed mainly for use by programs.

The attempt in this specification is to satisfy the diverse needs of
users of maxi-hosts, mini-hosts, personal workstations, and TACs,
with a simple, and easily implemented protocol design.

This paper assumes knowledge of the Transmission Control Protocol
(TCP) [2] and the Telnet Protocol [3]. These documents are contained
in the ARPA-Internet protocol handbook [1].

2. OVERVIEW

In this section, the history, the terminology, and the FTP model are
discussed. The terms defined in this section are only those that
have special significance in FTP. Some of the terminology is very
specific to the FTP model; some readers may wish to turn to the
section on the FTP model while reviewing the terminology.







Postel & Reynolds [Page 1]




RFC 959 October 1985
File Transfer Protocol


2.1. HISTORY

FTP has had a long evolution over the years. Appendix III is a
chronological compilation of Request for Comments documents
relating to FTP. These include the first proposed file transfer
mechanisms in 1971 that were developed for implementation on hosts
at M.I.T. (RFC 114), plus comments and discussion in RFC 141.

RFC 172 provided a user-level oriented protocol for file transfer
between host computers (including terminal IMPs). A revision of
this as RFC 265, restated FTP for additional review, while RFC 281
suggested further changes. The use of a "Set Data Type"
transaction was proposed in RFC 294 in January 1982.

RFC 354 obsoleted RFCs 264 and 265. The File Transfer Protocol
was now defined as a protocol for file transfer between HOSTs on
the ARPANET, with the primary function of FTP defined as
transfering files efficiently and reliably among hosts and
allowing the convenient use of remote file storage capabilities.
RFC 385 further commented on errors, emphasis points, and
additions to the protocol, while RFC 414 provided a status report
on the working server and user FTPs. RFC 430, issued in 1973,
(among other RFCs too numerous to mention) presented further
comments on FTP. Finally, an "official" FTP document was
published as RFC 454.

By July 1973, considerable changes from the last versions of FTP
were made, but the general structure remained the same. RFC 542
was published as a new "official" specification to reflect these
changes. However, many implementations based on the older
specification were not updated.

In 1974, RFCs 607 and 614 continued comments on FTP. RFC 624
proposed further design changes and minor modifications. In 1975,
RFC 686 entitled, "Leaving Well Enough Alone", discussed the
differences between all of the early and later versions of FTP.
RFC 691 presented a minor revision of RFC 686, regarding the
subject of print files.

Motivated by the transition from the NCP to the TCP as the
underlying protocol, a phoenix was born out of all of the above
efforts in RFC 765 as the specification of FTP for use on TCP.

This current edition of the FTP specification is intended to
correct some minor documentation errors, to improve the
explanation of some protocol features, and to add some new
optional commands.


Postel & Reynolds [Page 2]

Wednesday, August 28th 2002 - 01:30:59 PM
what your parents call you: elias
what planet are you from??: aaa
where am I???: magiclly appeared
whats a guestbook without a comment???:*********************** STANDARD REPRESENTATION OF CONTROL FUNCTIONS*****************************

As stated in the Introduction to this document, the primary goal
of the TELNET protocol is the provision of a standard interfacing
of terminal devices and terminal-oriented processes through the
network. Early experiences with this type of interconnection have
shown that certain functions are implemented by most servers, but
that the methods of invoking these functions differ widely. For a
human user who interacts with several server systems, these
differences are highly frustrating. TELNET, therefore, defines a
standard representation for five of these functions, as described




below. These standard representations have standard, but not
required, meanings (with the exception that the Interrupt Process
(IP) function may be required by other protocols which use
TELNET); that is, a system which does not provide the function to
local users need not provide it to network users and may treat the
standard representation for the function as a No-operation. On
the other hand, a system which does provide the function to a
local user is obliged to provide the same function to a network
user who transmits the standard representation for the function.

Interrupt Process (IP)

Many systems provide a function which suspends, interrupts,
aborts, or terminates the operation of a user process. This
function is frequently used when a user believes his process is
in an unending loop, or when an unwanted process has been
inadvertently activated. IP is the standard representation for
invoking this function. It should be noted by implementers
that IP may be required by other protocols which use TELNET,
and therefore should be implemented if these other protocols
are to be supported.

Abort Output (AO)

Many systems provide a function which allows a process, which
is generating output, to run to completion (or to reach the
same stopping point it would reach if running to completion)
but without sending the output to the user's terminal.
Further, this function typically clears any output already
produced but not yet actually printed (or displayed) on the
user's terminal. AO is the standard representation for
invoking this function. For example, some subsystem might
normally accept a user's command, send a long text string to
the user's terminal in response, and finally signal readiness
to accept the next command by sending a "prompt" character
(preceded by <CR><LF>) to the user's terminal. If the AO were
received during the transmission of the text string, a
reasonable implementation would be to suppress the remainder of
the text string, but transmit the prompt character and the
preceding <CR><LF>. (This is possibly in distinction to the
action which might be taken if an IP were received; the IP
might cause suppression of the text string and an exit from the
subsystem.)

It should be noted, by server systems which provide this
function, that there may be buffers external to the system (in






the network and the user's local host) which should be cleared;
the appropriate way to do this is to transmit the "Synch"
signal (described below) to the user system.

Are You There (AYT)

Many systems provide a function which provides the user with
some visible (e.g., printable) evidence that the system is
still up and running. This function may be invoked by the user
when the system is unexpectedly "silent" for a long time,
because of the unanticipated (by the user) length of a
computation, an unusually heavy system load, etc. AYT is the
standard representation for invoking this function.

Erase Character (EC)

Many systems provide a function which deletes the last
preceding undeleted character or "print position"* from the
stream of data being supplied by the user. This function is
typically used to edit keyboard input when typing mistakes are
made. EC is the standard representation for invoking this
function.

*NOTE: A "print position" may contain several characters
which are the result of overstrikes, or of sequences such as
<char1> BS <char2>...

Erase Line (EL)

Many systems provide a function which deletes all the data in
the current "line" of input. This function is typically used
to edit keyboard input. EL is the standard representation for
invoking this function.

THE TELNET "SYNCH" SIGNAL

Most time-sharing systems provide mechanisms which allow a
terminal user to regain control of a "runaway" process; the IP and
AO functions described above are examples of these mechanisms.
Such systems, when used locally, have access to all of the signals
supplied by the user, whether these are normal characters or
special "out of band" signals such as those supplied by the
teletype "BREAK" key or the IBM 2741 "ATTN" key. This is not
necessarily true when terminals are connected to the system
through the network; the network's flow control mechanisms may
cause such a signal to be buffered elsewhere, for example in the
user's host.





To counter this problem, the TELNET "Synch" mechanism is
introduced. A Synch signal consists of a TCP Urgent notification,
coupled with the TELNET command DATA MARK. The Urgent
notification, which is not subject to the flow control pertaining
to the TELNET connection, is used to invoke special handling of
the data stream by the process which receives it. In this mode,
the data stream is immediately scanned for "interesting" signals
as defined below, discarding intervening data. The TELNET command
DATA MARK (DM) is the synchronizing mark in the data stream which
indicates that any special signal has already occurred and the
recipient can return to normal processing of the data stream.

The Synch is sent via the TCP send operation with the Urgent
flag set and the DM as the last (or only) data octet.

When several Synchs are sent in rapid succession, the Urgent
notifications may be merged. It is not possible to count Urgents
since the number received will be less than or equal the number
sent. When in normal mode, a DM is a no operation; when in urgent
mode, it signals the end of the urgent processing.

If TCP indicates the end of Urgent data before the DM is found,
TELNET should continue the special handling of the data stream
until the DM is found.

If TCP indicates more Urgent data after the DM is found, it can
only be because of a subsequent Synch. TELNET should continue
the special handling of the data stream until another DM is
found.

"Interesting" signals are defined to be: the TELNET standard
representations of IP, AO, and AYT (but not EC or EL); the local
analogs of these standard representations (if any); all other
TELNET commands; other site-defined signals which can be acted on
without delaying the scan of the data stream.

Since one effect of the SYNCH mechanism is the discarding of
essentially all characters (except TELNET commands) between the
sender of the Synch and its recipient, this mechanism is specified
as the standard way to clear the data path when that is desired.
For example, if a user at a terminal causes an AO to be
transmitted, the server which receives the AO (if it provides that
function at all) should return a Synch to the user.

Finally, just as the TCP Urgent notification is needed at the
TELNET level as an out-of-band signal, so other protocols which
make use of TELNET may require a TELNET command which can be
viewed as an out-of-band signal at a different level.




By convention the sequence [IP, Synch] is to be used as such a
signal. For example, suppose that some other protocol, which uses
TELNET, defines the character string STOP analogously to the
TELNET command AO. Imagine that a user of this protocol wishes a
server to process the STOP string, but the connection is blocked
because the server is processing other commands. The user should
instruct his system to:

1. Send the TELNET IP character;

2. Send the TELNET SYNC sequence, that is:

Send the Data Mark (DM) as the only character
in a TCP urgent mode send operation.

3. Send the character string STOP; and

4. Send the other protocol's analog of the TELNET DM, if any.

The user (or process acting on his behalf) must transmit the
TELNET SYNCH sequence of step 2 above to ensure that the TELNET IP
gets through to the server's TELNET interpreter.

The Urgent should wake up the TELNET process; the IP should
wake up the next higher level process.

THE NVT PRINTER AND KEYBOARD

The NVT printer has an unspecified carriage width and page length
and can produce representations of all 95 USASCII graphics (codes
32 through 126). Of the 33 USASCII control codes (0 through 31
and 127), and the 128 uncovered codes (128 through 255), the
following have specified meaning to the NVT printer:

NAME CODE MEANING

NULL (NUL) 0 No Operation
Line Feed (LF) 10 Moves the printer to the
next print line, keeping the
same horizontal position.
Carriage Return (CR) 13 Moves the printer to the left
margin of the current line.








Postel & Reynolds [Page 10]



RFC 854 May 1983


In addition, the following codes shall have defined, but not
required, effects on the NVT printer. Neither end of a TELNET
connection may assume that the other party will take, or will
have taken, any particular action upon receipt or transmission
of these:

BELL (BEL) 7 Produces an audible or
visible signal (which does
NOT move the print head).
Back Space (BS) 8 Moves the print head one
character position towards
the left margin.
Horizontal Tab (HT) 9 Moves the printer to the
next horizontal tab stop.
It remains unspecified how
either party determines or
establishes where such tab
stops are located.
Vertical Tab (VT) 11 Moves the printer to the
next vertical tab stop. It
remains unspecified how
either party determines or
establishes where such tab
stops are located.
Form Feed (FF) 12 Moves the printer to the top
of the next page, keeping
the same horizontal position.

All remaining codes do not cause the NVT printer to take any
action.

The sequence "CR LF", as defined, will cause the NVT to be
positioned at the left margin of the next print line (as would,
for example, the sequence "LF CR"). However, many systems and
terminals do not treat CR and LF independently, and will have to
go to some effort to simulate their effect. (For example, some
terminals do not have a CR independent of the LF, but on such
terminals it may be possible to simulate a CR by backspacing.)
Therefore, the sequence "CR LF" must be treated as a single "new
line" character and used whenever their combined action is
intended; the sequence "CR NUL" must be used where a carriage
return alone is actually desired; and the CR character must be
avoided in other contexts. This rule gives assurance to systems
which must decide whether to perform a "new line" function or a
multiple-backspace that the TELNET stream contains a character
following a CR that will allow a rational decision.

Note that "CR LF" or "CR NUL" is required in both directions




(in the default ASCII mode), to preserve the symmetry of the
NVT model. Even though it may be known in some situations
(e.g., with remote echo and suppress go ahead options in
effect) that characters are not being sent to an actual
printer, nonetheless, for the sake of consistency, the protocol
requires that a NUL be inserted following a CR not followed by
a LF in the data stream. The converse of this is that a NUL
received in the data stream after a CR (in the absence of
options negotiations which explicitly specify otherwise) should
be stripped out prior to applying the NVT to local character
set mapping.

The NVT keyboard has keys, or key combinations, or key sequences,
for generating all 128 USASCII codes. Note that although many
have no effect on the NVT printer, the NVT keyboard is capable of
generating them.

In addition to these codes, the NVT keyboard shall be capable of
generating the following additional codes which, except as noted,
have defined, but not reguired, meanings. The actual code
assignments for these "characters" are in the TELNET Command
section, because they are viewed as being, in some sense, generic
and should be available even when the data stream is interpreted
as being some other character set.

Synch

This key allows the user to clear his data path to the other
party. The activation of this key causes a DM (see command
section) to be sent in the data stream and a TCP Urgent
notification is associated with it. The pair DM-Urgent is to
have required meaning as defined previously.

Break (BRK)

This code is provided because it is a signal outside the
USASCII set which is currently given local meaning within many
systems. It is intended to indicate that the Break Key or the
Attention Key was hit. Note, however, that this is intended to
provide a 129th code for systems which require it, not as a
synonym for the IP standard representation.

Interrupt Process (IP)

Suspend, interrupt, abort or terminate the process to which the
NVT is connected. Also, part of the out-of-band signal for
other protocols which use TELNET.





Abort Output (AO)

Allow the current process to (appear to) run to completion, but
do not send its output to the user. Also, send a Synch to the
user.

Are You There (AYT)

Send back to the NVT some visible (i.e., printable) evidence
that the AYT was received.

Erase Character (EC)

The recipient should delete the last preceding undeleted
character or "print position" from the data stream.

Erase Line (EL)

The recipient should delete characters from the data stream
back to, but not including, the last "CR LF" sequence sent over
the TELNET connection.

The spirit of these "extra" keys, and also the printer format
effectors, is that they should represent a natural extension of
the mapping that already must be done from "NVT" into "local".
Just as the NVT data byte 68 (104 octal) should be mapped into
whatever the local code for "uppercase D" is, so the EC character
should be mapped into whatever the local "Erase Character"
function is. Further, just as the mapping for 124 (174 octal) is
somewhat arbitrary in an environment that has no "vertical bar"
character, the EL character may have a somewhat arbitrary mapping
(or none at all) if there is no local "Erase Line" facility.
Similarly for format effectors: if the terminal actually does
have a "Vertical Tab", then the mapping for VT is obvious, and
only when the terminal does not have a vertical tab should the
effect of VT be unpredictable.

TELNET COMMAND STRUCTURE

All TELNET commands consist of at least a two byte sequence: the
"Interpret as Command" (IAC) escape character followed by the code
for the command. The commands dealing with option negotiation are
three byte sequences, the third byte being the code for the option
referenced. This format was chosen so that as more comprehensive use
of the "data space" is made -- by negotiations from the basic NVT, of
course -- collisions of data bytes with reserved command values will
be minimized, all such collisions requiring the inconvenience, and





inefficiency, of "escaping" the data bytes into the stream. With the
current set-up, only the IAC need be doubled to be sent as data, and
the other 255 codes may be passed transparently.

The following are the defined TELNET commands. Note that these codes
and code sequences have the indicated meaning only when immediately
preceded by an IAC.

NAME CODE MEANING

SE 240 End of subnegotiation parameters.
NOP 241 No operation.
Data Mark 242 The data stream portion of a Synch.
This should always be accompanied
by a TCP Urgent notification.
Break 243 NVT character BRK.
Interrupt Process 244 The function IP.
Abort output 245 The function AO.
Are You There 246 The function AYT.
Erase character 247 The function EC.
Erase Line 248 The function EL.
Go ahead 249 The GA signal.
SB 250 Indicates that what follows is
subnegotiation of the indicated
option.
WILL (option code) 251 Indicates the desire to begin
performing, or confirmation that
you are now performing, the
indicated option.
WON'T (option code) 252 Indicates the refusal to perform,
or continue performing, the
indicated option.
DO (option code) 253 Indicates the request that the
other party perform, or
confirmation that you are expecting
the other party to perform, the
indicated option.
DON'T (option code) 254 Indicates the demand that the
other party stop performing,
or confirmation that you are no
longer expecting the other party
to perform, the indicated option.
IAC 255 Data Byte 255.







CONNECTION ESTABLISHMENT

The TELNET TCP connection is established between the user's port U
and the server's port L. The server listens on its well known port L
for such connections. Since a TCP connection is full duplex and
identified by the pair of ports, the server can engage in many
simultaneous connections involving its port L and different user
ports U.

Port Assignment

When used for remote user access to service hosts (i.e., remote
terminal access) this protocol is assigned server port 23
(27 octal). That is L=23.

Wednesday, August 28th 2002 - 04:05:26 AM
what your parents call you: giannis
what planet are you from??: austria
where am I???: magiclly appeared
whats a guestbook without a comment???:FILE TRANSFER PROTOCOL (FTP)
Status of this Memo
This memo is the official specification of the File Transfer
Protocol (FTP). Distribution of this memo is unlimited.

The following new optional commands are included in this edition of
the specification:

CDUP (Change to Parent Directory), SMNT (Structure Mount), STOU
(Store Unique), RMD (Remove Directory), MKD (Make Directory), PWD
(Print Directory), and SYST (Sys42tem).

Note that this specification is compatible with the previous edition.


1. INTRODUCTION
The objectives of FTP are 1) to promote sharing of files (computer
programs and/or data), 2) to encourage indirect or implicit (via
programs) use of remote computers, 3) to shield a user from
variations in file storage systems among hosts, and 4) to transfer
data reliably and efficiently. FTP, though usable directly by a user
at a terminal, is designed mainly for use by programs.

The attempt in this specification is to satisfy the diverse needs of
users of maxi-hosts, mini-hosts, personal workstations, and TACs,
with a simple, and easily implemented protocol design.

This paper assumes knowledge of the Transmission Control Protocol
(TCP) [2] and the Telnet Protocol [3]. These documents are contained
in the ARPA-Internet protocol handbook [1].


2. OVERVIEW
In this section, the history, the terminology, and the FTP model are
discussed. The terms defined in this section are only those that
have special significance in FTP. Some of the terminology is very
specific to the FTP model; some readers may wish to turn to the
section on the FTP model while reviewing the terminology.


2.1. HISTORY
FTP has had a long evolution over the years. Appendix III is a
chronological compilation of Request for Comments documents
relating to FTP. These include the first proposed file transfer
mechanisms in 1971 that were developed for implementation on hosts
at M.I.T. (RFC 114), plus comments and discussion in RFC 141.

RFC 172 provided a user-level oriented protocol for file transfer
between host computers (including terminal IMPs). A revision of
this as RFC 265, restated FTP for additional review, while RFC 281
suggested further changes. The use of a "Set Data Type"
transaction was proposed in RFC 294 in January 1982.

RFC 354 obsoleted RFCs 264 and 265. The File Transfer Protocol
was now defined as a protocol for file transfer between HOSTs on
Wednesday, August 28th 2002 - 03:37:08 AM
what your parents call you: Greg
what planet are you from??: Colorado
so i can reach you: i_am_the_leopardskin_underpants_puppy@hotmail.com
Homepage URL: http://geocities.com/greggyboy78
where am I???: magiclly appeared
whats a guestbook without a comment???:Your fly is down.
Monday, August 26th 2002 - 11:13:49 AM
what your parents call you: Ryan DaRichest
what planet are you from??: URANUS
so i can reach you: CALL ME
where am I???: magiclly appeared
whats a guestbook without a comment???:HAVE YOU BEEN CHEATED OUT
OF YOUR MONEY BY AN
INTERNET SCAM??!!!! This Investment Works!!!

READ THE FOLLOWING EXTREMELY CAREFULLY

„h I know that I have and I Know exactly how it happened. Any way if you know how you were supposed to cross off the #1 name and bring (name #2 to #1 and so on an so forth) The makers of the scam have created a piece of software that changes the names back to what they were as soon as you post it on a website chat board, bulletin board ect. Isnˇ¦t it Genius. But if you have it in you to trust in another human that you donˇ¦t know again after what happened to you then hey try this and I am Just another person interested in helping other people. If you want to be avenged and make actual money.
INSTRUCTIONS

You must Highlight this whole document from the place were you found this document. Once it is highlighted right click on the highlighted document and scroll down to the COPY choice and click on it. Then go and open up a Blank notepad document and right click on that and scroll down to paste and click on it so now you should have this document copied into your Notepad document.
OK Here is your way to make quick and easy money that works (NO SCAM LIKE IN THOSE OTHER Ways) Donˇ¦t Call this a scam but call it an investmant in other People. This is totally legal and easy All that you need is 6 unmarked U.S. Dollar Bills, Six Envelopes, Six Pieces of paper, and six Stamps. After you do all this you need to post this to at the very least 200 newsgroups, which is pretty easy considering that there are a little over 32,000 Newsgroups which makes a very large pot of newsgroups. There is very many people who think that there is definatly a catch, that it is way to good to be true well if your one of those people then fine you can save youˇ¦re $6, donˇ¦t be rich and know that you cantˇ¦t trust another human with your measly 6 DOLLARS. Even listen to what This Guy has to say. AND I QUOTE I am so happy that I did this AND TRUST ME and it actually works All I wanted was a Motocross Dirt Bike and I was willing to try anything so I was browsing on the internet and saw this and I tried it and boy am I rich and with the money I bought a brand new YZ85 within 7 days I started getting money in the mail I was shocked and exited.

Mailing The Money

Now all you have to do is mail the money to each person on the list AND THE MAILING OF THE MONEY IS SOOOOO IMPORTANT Because if no one mailed the money than this whole thing wouldnˇ¦t work. $6 IS DEFINATLY NOT WORTH MESSING THIS WHOLE THING UP. Now Mail a piece of paper that says PLEASE ADD ME TO YOUR MAILING LIST then add your name and address Then Place a 1 dollar bill in the envelope ( But place Dark paper around the dollar bill to prevent mail theft.

#1) Ryan Nelson, 23 Heron Circle, Lewes DE 19958,
USA

#2) Shawn Gibson, 5040 Church Street, Ann Arbor, MI 48105
USA

#3) Phillip Eller , 9076 Macon RD. Saline, MI 48176
USA

#4) Alden Nelson, 23 Heron Circle, Lewes DE 19958
USA

#5) Theresa Rawlins, 22 Coventry Dr., Lewes DE 19958
USA

#6) Ryan Brandt, 114 W. McKay St., Saline, MI 48176
USA


Now after you mail the envelopes containing the paper that has the writing that says JOIN ME TO YOUR MAILING LIST and has your name and address and the 1 dollar bill (1 envelope to each person on the list). Anyway after you mail the envelopes then move Name #1 off the list and Name #6 becomes Name#5 ,5 becomes 4, 4 becomes 3 ECT. And now you will have an empty space at #6 and there you will put your name and Address. Now I know my friend who tried to do this differently and made about 150 bucks but after redoing it and doing it the real way he made over $10,000.


HOW TO POST TO NEWSGROUPS VERY IMPORTANT
Next You have to copy the changes youˇ¦ve made (By Going all the way to the top Clicking and draging all the way to the bottom now you should have a highlighted document. Then right click on the highlighted document and scroll down to copy) to the Document youˇ¦re Reading now and Paste them to a notepad document and save it. Now eventually your name will be booted off the list but then just find this document and redo it all again. Now to Do this you Must Scroll all the way to the top of this document click on a blank area all the way at the top and drag the cursor down to the very bottom so you highlight this whole document then let go and copy the document to at least 200 Newsgroups ( Chat Boards, Bulletin Boards, Guestbooks ECT.). You must at least post it on 200 Newsgroups but the more you post the more money you make.
This way more people will see the document and send money. And within 7 days you will start to get money in the mail by 60 days you can get up to 50K or (50,000) and essentially your name will make it to #1 and you will be swimming in thousands of dollars in cash. Basiclly when a person sends replies say you get 10 replies (A Low Example) then you make 10 bucks then those 10 people send it and then they get 10 replies then you have 100 bucks right there and then 10 more is 1,000 bucks and then 10 more is 10,000 DOLLARS and there you are only Then your only at 5 say you get 10 more and thatˇ¦s 100,000 and thatˇ¦s only with 10 Replies each time Usually you get way more. You Get some major income Cash.


HEY GOOD LUCK ALL YOU FUTURE MILLIONARES
IF YOU CAN TRUST ANOTHER HUMAN WITH 6 BUCKS
THAN READ CAREFULLY AND GIVE IT A SHOT.

IF YOU THINK I HAVE THAT SOFTWARE ON THIS THEN YOUR STUPID
WHY WOULD I TELL YU IF I HAD IT INSTALLED

GOOD LUCK!!!!!!!

Saturday, August 24th 2002 - 03:34:14 PM
what your parents call you: mika
what planet are you from??: eart
so i can reach you: asd@asd.com
Homepage URL: http:/a/sdad
where am I???: wondering through
whats a guestbook without a comment???: LIST (LIST): This command causes a list to be sent from the server to the passive DTP. If the pathname specifies a directory or other group of files, the server should transfer a list of files in the specified directory. If the pathname specifies a file then the server should send current information on the file. A null argument implies the user's current working or default directory. The data transfer is over the data connection in type ASCII or type EBCDIC. (The user must ensure that the TYPE is appropriately ASCII or EBCDIC). Since the information on a file may vary widely from system to system, this information may be hard to use automatically in a program, but may be quite useful to a human user.

NAME LIST (NLST): This command causes a directory listing to be sent from server to user site. The pathname should specify a directory or other system-specific file group descriptor; a null argument implies the current directory. The server will return a stream of names of files and no other information. The data will be transferred in ASCII or EBCDIC type over the data connection as valid pathname strings separated by <CRLF> or <NL>. (Again the user must ensure that the TYPE is correct.) This command is intended to return information that can be used by a program to further process the files automatically. For example, in the implementation of a "multiple get" function.

SITE PARAMETERS (SITE): This command is used by the server to provide services specific to his system that are essential to file transfer but not sufficiently universal to be included as commands in the protocol. The nature of these services and the specification of their syntax can be stated in a reply to the HELP SITE command.

SYSTEM (SYST): This command is used to find out the type of operating system at the server.

STATUS (STAT): This command shall cause a status response to be sent over the control connection in the form of a reply. The command may be sent during a file transfer (along with the Telnet IP and Synch signals--see the Section on FTP Commands) in which case the server will respond with the status of the operation in progress, or it may be sent between file transfers. In the latter case, the command may have an argument field. If the argument is a pathname, the command is analogous to the "list" command except that data shall be transferred over the control connection. If a partial pathname is given, the server may respond with a list of file names or attributes associated with that specification. If no argument is given, the server should return general status information about the server FTP process. This should include current values of all transfer parameters and the status of connections.

HELP (HELP): This command shall cause the server to send helpful information regarding its implementation status over the control connection to the user. The command may take an argument (e.g., any command name) and return more specific information as a response. The reply is type 211 or 214. It is suggested that HELP be allowed before entering a USER command. The server may use this reply to specify site-dependent parameters, e.g., in response to HELP SITE.

NOOP (NOOP): This command does not affect any parameters or previously entered commands. It specifies no action other than that the server send an OK reply.

The File Transfer Protocol follows the specifications of the Telnet protocol for all communications over the control connection. Since the language used for Telnet communication may be a negotiated option, all references in the next two sections will be to the "Telnet language" and the corresponding "Telnet end-of-line code". Currently, one may take these to mean NVT-ASCII and <CRLF>. No other specifications of the Telnet protocol will be cited.
FTP commands are "Telnet strings" terminated by the "Telnet end of line code". The command codes themselves are alphabetic characters terminated by the character <SP> (Space) if parameters follow and Telnet-EOL otherwise. The command codes and the semantics of commands are described in this section; the detailed syntax of commands is specified in the Section on Commands, the reply sequences are discussed in the Section on Sequencing of Commands and Replies, and scenarios illustrating the use of commands are provided in the Section on Typical FTP Scenarios.
FTP commands may be partitioned as those specifying access-control identifiers, data transfer parameters, or FTP service requests. Certain commands (such as ABOR, STAT, QUIT) may be sent over the control connection while a data transfer is in progress. Some servers may not be able to monitor the control and data connections simultaneously, in which case some special action will be necessary to get the server's attention. The following ordered format is tentatively recommended:
1. User system inserts the Telnet "Interrupt Process" (IP) signal in the Telnet stream.
2. User system sends the Telnet "Synch" signal.
3. User system inserts the command (e.g., ABOR) in the Telnet stream.
4. Server PI, after receiving "IP", scans the Telnet stream for EXACTLY ONE FTP command.

4.2. FTP REPLIES

Replies to File Transfer Protocol commands are devised to ensure the synchronization of requests and actions in the process of file transfer, and to guarantee that the user process always knows the state of the Server. Every command must generate at least one reply, although there may be more than one; in the latter case, the multiple replies must be easily distinguished. In addition, some commands occur in sequential groups, such as USER, PASS and ACCT, or RNFR and RNTO. The replies show the existence of an intermediate state if all preceding commands have been successful. A failure at any point in the sequence necessitates the repetition of the entire sequence from the beginning.


5. DECLARATIVE SPECIFICATIONS

5.1. MINIMUM IMPLEMENTATION

In order to make FTP workable without needless error messages, the following minimum implementation is required for all servers:
TYPE - ASCII Non-print
MODE - Stream
STRUCTURE - File, Record
COMMANDS - USER, QUIT, PORT, TYPE, MODE, STRU,
for the default values RETR, STOR, NOOP.

The default values for transfer parameters are:
TYPE - ASCII Non-print
MODE - Stream
STRU - File
All hosts must accept the above as the standard defaults.

5.2. CONNECTIONS

The server protocol interpreter shall "listen" on Port L. The user or user protocol interpreter shall initiate the full-duplex control connection. Server- and user- processes should follow the conventions of the Telnet protocol as specified in the ARPA-Internet Protocol Handbook [1]. Servers are under no obligation to provide for editing of command lines and may require that it be done in the user host. The control connection shall be closed by the server at the user's request after all transfers and replies are completed. The user-DTP must "listen" on the specified data port; this may be the default user port (U) or a port specified in the PORT command. The server shall initiate the data connection from his own default data port (L-1) using the specified user data port. The direction of the transfer and the port used will be determined by the FTP service command. Note that all FTP implementation must support data transfer using the default port, and that only the USER-PI may initiate the use of non-default ports. When data is to be transferred between two servers, A and B, the user-PI, C, sets up control connections with both server-PI's. One of the servers, say A, is then sent a PASV command telling him to "listen" on his data port rather than initiate a connection when he receives a transfer service command. When the user-PI receives an acknowledgment to the PASV command, which includes the identity of the host and port being listened on, the user-PI then sends A's port, a, to B in a PORT command; a reply is returned. The user-PI may then send the corresponding service commands to A and B. Server B initiates the connection and the transfer proceeds. The data connection shall be closed by the server under the conditions described in the Section on Establishing Data Connections. If the data connection is to be closed following a data transfer where closing the connection is not required to indicate the end-of-file, the server must do so immediately. Waiting until after a new transfer command is not permitted because the user-process will have already tested the data connection to see if it needs to do a "listen"; (remember that the user must "listen" on a closed data port BEFORE sending the transfer request). To prevent a race condition here, the server sends a reply (226) after closing the data connection (or if the connection is left open, a "file transfer completed" reply (250) and the user-PI should wait for one of these replies before issuing a new transfer command). Any time either the user or server see that the connection is being closed by the other side, it should promptly read any remaining data queued on the connection and issue the close on its own side.

5.3. COMMANDS

The commands are Telnet character strings transmitted over the control connections as described in the Section on FTP Commands. The command functions and semantics are described in the Section on Access Control Commands, Transfer Parameter Commands, FTP Service Commands, and Miscellaneous Commands. The command syntax is specified here. The commands begin with a command code followed by an argument field. The command codes are four or fewer alphabetic characters. Upper and lower case alphabetic characters are to be treated identically. Thus, any of the following may represent the retrieve command:
RETR Retr retr ReTr rETr
This also applies to any symbols representing parameter values, such as A or a for ASCII TYPE. The command codes and the argument fields are separated by one or more spaces. The argument field consists of a variable length character string ending with the character sequence <CRLF> (Carriage Return, Line Feed) for NVT-ASCII representation; for other negotiated languages a different end of line character might be used. It should be noted that the server is to take no action until the end of line code is received. The syntax is specified below in NVT-ASCII. All characters in the argument field are ASCII characters including any ASCII represented decimal integers. Square brackets denote an optional argument field. If the option is not taken, the appropriate default is implied.

5.3.1. FTP COMMANDS

The following are the FTP commands:

USER <SP> <username> <CRLF>
PASS <SP> <password> <CRLF>
ACCT <SP> <account-information> <CRLF>
CWD <SP> <pathname> <CRLF>
CDUP <CRLF>
SMNT <SP> <pathname> <CRLF>
QUIT <CRLF>
REIN <CRLF>
PORT <SP> <host-port> <CRLF>
PASV <CRLF>
TYPE <SP> <type-code> <CRLF>
STRU <SP> <structure-code> <CRLF>
MODE <SP> <mode-code> <CRLF>
RETR <SP> <pathname> <CRLF>
STOR <SP> <pathname> <CRLF>
STOU <CRLF>
APPE <SP> <pathname> <CRLF>
ALLO <SP> <decimal-integer> [<SP> R <SP> <decimal-integer>] <CRLF>
REST <SP> <marker> <CRLF>
RNFR <SP> <pathname> <CRLF>
RNTO <SP> <pathname> <CRLF>
ABOR <CRLF>
DELE <SP> <pathname> <CRLF>
RMD <SP> <pathname> <CRLF>
MKD <SP> <pathname> <CRLF>
PWD <CRLF>
LIST [<SP> <pathname>] <CRLF>
NLST [<SP> <pathname>] <CRLF>
SITE <SP> <string> <CRLF>
SYST <CRLF>
STAT [<SP> <pathname>] <CRLF>
HELP [<SP> <string>] <CRLF>
NOOP <CRLF>

5.3.2. FTP COMMAND ARGUMENTS

The syntax of the above argument fields (using BNF notation where applicable) is:

<username> ::= <string>
<password> ::= <string>
<account-information> ::= <string>
<string> ::= <char> | <char><string>
<char> ::= any of the 128 ASCII characters except <CR> and <LF>
<marker> ::= <pr-string>
<pr-string> ::= <pr-char> | <pr-char><pr-string>
<pr-char> ::= printable characters, any ASCII code 33 through 126
<byte-size> ::= <number>
<host-port> ::= <host-number>,<port-number>
<host-number> ::= <number>,<number>,<number>,<number>
<port-number> ::= <number>,<number>
<number> ::= any decimal integer 1 through 255
<form-code> ::= N | T | C
<type-code> ::= A [<sp> <form-code>]| E [<sp> <form-code>]
| I | L <sp> <byte-size>
<structure-code> ::= F | R | P
<mode-code> ::= S | B | C
<pathname> ::= <string>
<decimal-integer> ::= any decimal integer



6. CONNECTION ESTABLISHMENT

The FTP control connection is established via TCP between the user
process port U and the server process port L. This protocol is
assigned the service port 21 (25 octal), that is L=21.


7. DIRECTORY COMMANDS

Since UNIX has a tree-like directory structure in which directories
are as easy to manipulate as ordinary files, it is useful to expand
the FTP servers on these machines to include commands which deal with
the creation of directories. Since there are other hosts on the
ARPA-Internet which have tree-like directories (including TOPS-20 and
Multics), these commands are as general as possible.

Four directory commands have been added to FTP:

MKD pathname: Make a directory with the name "pathname".
RMD pathname: Remove the directory with the name "pathname".
PWD : Print the current working directory name.
CDUP : Change to the parent of the current working directory.

The "pathname" argument should be created (removed) as a subdirectory of the current working directory, unless the "pathname"string contains sufficient information to specify otherwise to the server, e.g., "pathname" is an absolute pathname (in UNIX and Multics), or pathname is something like "<abso.lute.path>" to TOPS-20.
Friday, August 23rd 2002 - 06:26:54 AM
what your parents call you: mika
what planet are you from??: eart
so i can reach you: asd@asd.com
Homepage URL: http://asd.com
where am I???: wondering through
whats a guestbook without a comment???:

FILE TRANSFER PROTOCOL (FTP)


1. INTRODUCTION

The objectives of FTP are 1) to promote sharing of files (computer programs and/or data), 2) to encourage indirect or implicit (via programs) use of remote computers, 3) to shield a user from variations in file storage systems among hosts, and 4) to transfer data reliably and efficiently. FTP, though usable directly by a user at a terminal, is designed mainly for use by programs.
The attempt in this specification is to satisfy the diverse needs of users of maxi-hosts, mini-hosts, personal workstations, and TACs, with a simple, and easily implemented protocol design.


2. OVERVIEW

In this section, the history, the terminology, and the FTP model are discussed. The terms defined in this section are only those that have special significance in FTP. Some of the terminology is very specific to the FTP model.

2.1. HISTORY
FTP has had a long evolution over the years. Appendix III is a chronological compilation of Request for Comments documents relating to FTP. These include the first proposed file transfer mechanisms in 1971 that were developed for implementation on hosts at M.I.T. (RFC 114), plus comments and discussion in RFC 141. RFC 172 provided a user-level oriented protocol for file transfer between host computers (including terminal IMPs). A revision of this as RFC 265, restated FTP for additional review, while RFC 281 suggested further changes. The use of a "Set Data Type" transaction was proposed in RFC 294 in January 1982. RFC 354 obsoleted RFCs 264 and 265. The File Transfer Protocol was now defined as a protocol for file transfer between HOSTs on the ARPANET, with the primary function of FTP defined as transfering files efficiently and reliably among hosts and allowing the convenient use of remote file storage capabilities. RFC 385 further commented on errors, emphasis points, and additions to the protocol, while RFC 414 provided a status report on the working server and user FTPs. RFC 430, issued in 1973, (among other RFCs too numerous to mention) presented further comments on FTP. Finally, an "official" FTP document was published as RFC 454.
By July 1973, considerable changes from the last versions of FTP were made, but the general structure remained the same. RFC 542 was published as a new "official" specification to reflect these changes. However, many implementations based on the older specification were not updated. In 1974, RFCs 607 and 614 continued comments on FTP. RFC 624 proposed further design changes and minor modifications. In 1975, RFC 686 entitled, "Leaving Well Enough Alone", discussed the differences between all of the early and later versions of FTP. RFC 691 presented a minor revision of RFC 686, regarding the subject of print files.
Motivated by the transition from the NCP to the TCP as the underlying protocol, a phoenix was born out of all of the above efforts in RFC 765 as the specification of FTP for use on TCP.

2.2. TERMINOLOGY

ASCII: The ASCII character set is as defined in the ARPA-Internet Protocol Handbook. In FTP, ASCII characters are defined to be the lower half of an eight-bit code set (i.e., the most significant bit is zero).

Access controls: Access controls define users' access privileges to the use of a system, and to the files in that system. Access controls are necessary to prevent unauthorized or accidental use of files. It is the prerogative of a server-FTP process to invoke access controls.

Byte size: There are two byte sizes of interest in FTP: the logical byte size of the file, and the transfer byte size used for the transmission of the data. The transfer byte size is always 8 bits. The transfer byte size is not necessarily the byte size in which data is to be stored in a system, nor the logical byte size for interpretation of the structure of the data.

Control connection: The communication path between the USER-PI and SERVER-PI for the exchange of commands and replies. This connection follows the Telnet Protocol.

Data connection: A full duplex connection over which data is transferred, in a specified mode and type. The data transferred may be a part of a file, an entire file or a number of files. The path may be between a server-DTP and a user-DTP, or between two server-DTPs.

Data port: The passive data transfer process "listens" on the data port for a connection from the active transfer process in order to open the data connection.

DTP: The data transfer process establishes and manages the data connection. The DTP can be passive or active.

End-of-Line: The end-of-line sequence defines the separation of printing lines. The sequence is Carriage Return, followed by Line Feed.

EOF: The end-of-file condition that defines the end of a file being transferred.

EOR: The end-of-record condition that defines the end of a record being transferred.

Error recovery: A procedure that allows a user to recover from certain errors such as failure of either host system or transfer process. In FTP, error recovery may involve restarting a file transfer at a given checkpoint.

FTP commands: A set of commands that comprise the control information flowing from the user-FTP to the server-FTP process.

File: An ordered set of computer data (including programs), of arbitrary length, uniquely identified by a pathname.

Mode: The mode in which data is to be transferred via the data connection. The mode defines the data format during transfer including EOR and EOF. The transfer modes defined in FTP are described in the Section on Transmission Modes.

NVT: The Network Virtual Terminal as defined in the Telnet Protocol.

NVFS: The Network Virtual File System. A concept which defines a standard network file system with standard commands and pathname conventions.

Page: A file may be structured as a set of independent parts called pages. FTP supports the transmission of discontinuous files as independent indexed pages.

Pathname: Pathname is defined to be the character string which must be input to a file system by a user in order to identify a file. Pathname normally contains device and/or directory names, and file name specification. FTP does not yet specify a standard pathname convention. Each user must follow the file naming conventions of the file systems involved in the transfer.

PI: The protocol interpreter. The user and server sides of the protocol have distinct roles implemented in a user-PI and a server-PI.

Record: A sequential file may be structured as a number of contiguous parts called records. Record structures are supported by FTP but a file need not have record structure.

Reply: A reply is an acknowledgment (positive or negative) sent from server to user via the control connection in response to FTP commands. The general form of a reply is a completion code (including error codes) followed by a text string. The codes are for use by programs and the text is usually intended for human users.

Server-DTP: The data transfer process, in its normal "active" state, establishes the data connection with the "listening" data port. It sets up parameters for transfer and storage, and transfers data on command from its PI. The DTP can be placed in a "passive" state to listen for, rather than initiate a connection on the data port.

Server-FTP process: A process or set of processes which perform the function of file transfer in cooperation with a user-FTP process and, possibly, another server. The functions consist of a protocol interpreter (PI) and a data transfer process (DTP).

Server-PI: The server protocol interpreter "listens" on Port L for a connection from a user-PI and establishes a control communication connection. It receives standard FTP commands from the user-PI, sends replies, and governs the server-DTP.

Type: The data representation type used for data transfer and storage. Type implies certain transformations between the time of data storage and data transfer. The representation types defined in FTP are described in the Section on Establishing Data Connections.

User: A person or a process on behalf of a person wishing to obtain file transfer service. The human user may interact directly with a server-FTP process, but use of a user-FTP process is preferred since the protocol design is weighted towards automata.

User-DTP: The data transfer process "listens" on the data port for a connection from a server-FTP process. If two servers are transferring data between them, the user-DTP is inactive.

User-FTP process: A set of functions including a protocol interpreter, a data transfer process and a user interface which together perform the function of file transfer in cooperation with one or more server-FTP processes. The user interface allows a local language to be used in the command-reply dialogue with the user.

User-PI: The user protocol interpreter initiates the control connection from its port U to the server-FTP process, initiates FTP commands, and governs the user-DTP if that process is part of the file transfer.



2.3. THE FTP MODEL

With the above definitions in mind, the following model (shown in Figure 1) may be diagrammed for an FTP service.


Figure 1 Model for FTP Use

In the model described in Figure 1, the user-protocol interpreter initiates the control connection. The control connection follows the Telnet protocol. At the initiation of the user, standard FTP commands are generated by the user-PI and transmitted to the server process via the control connection. (The user may establish a direct control connection to the server-FTP, from a TAC terminal for example, and generate standard FTP commands independently, bypassing the user-FTP process.) Standard replies are sent from the server-PI to the user-PI over the control connection in response to the commands. The FTP commands specify the parameters for the data connection (data port, transfer mode, representation type, and structure) and the nature of file system operation (store, retrieve, append, delete, etc.). The user-DTP or its designate should "listen" on the specified data port, and the server initiate the data connection and data transfer in accordance with the specified parameters. It should be noted that the data port need not be in File Transfer Protocol the same host that initiates the FTP commands via the control connection, but the user or the user-FTP process must ensure a "listen" on the specified data port. It ought to also be noted that the data connection may be used for simultaneous sending and receiving.
In another situation a user might wish to transfer files between two hosts, neither of which is a local host. The user sets up control connections to the two servers and then arranges for a data connection between them. In this manner, control information is passed to the user-PI but data is transferred between the server data transfer processes.

The Relationship between FTP and Telnet:

The FTP uses the Telnet protocol on the control connection. This can be achieved in two ways: first, the user-PI or the server-PI may implement the rules of the Telnet Protocol directly in their own procedures; or, second, the user-PI or the server-PI may make use of the existing Telnet module in the system. Ease of implementaion, sharing code, and modular programming argue for the second approach. Efficiency and independence argue for the first approach. In practice, FTP relies on very little of the Telnet Protocol, so the first approach does not necessarily involve a large amount of code.

3. DATA TRANSFER FUNCTIONS

Files are transferred only via the data connection. The control connection is used for the transfer of commands, which describe the functions to be performed, and the replies to these commands (see the Section on FTP Replies). Several commands are concerned with the transfer of data between hosts. These data transfer commands include the MODE command which specify how the bits of the data are to be transmitted, and the STRUcture and TYPE commands, which are used to define the way in which the data are to be represented. The transmission and representation are basically independent but the "Stream" transmission mode is dependent on the file structure attribute and if "Compressed" transmission mode is used, the nature of the filler byte depends on the representation type.

3.1. DATA REPRESENTATION AND STORAGE

Data is transferred from a storage device in the sending host to a storage device in the receiving host. Often it is necessary to perform certain transformations on the data because data storage representations in the two systems are different. For example, NVT-ASCII has different data storage representations in different systems. DEC TOPS-20s's generally store NVT-ASCII as five 7-bit ASCII characters, left-justified in a 36-bit word. IBM Mainframe's store NVT-ASCII as 8-bit EBCDIC codes. Multics stores NVT-ASCII as four 9-bit characters in a 36-bit word. It is desirable to convert characters into the standard NVT-ASCII representation when transmitting text between dissimilar systems. The sending and receiving sites would have to perform the necessary transformations between the standard representation and their internal representations.

A different problem in representation arises when transmitting binary data (not character codes) between host systems with different word lengths. It is not always clear how the sender should send data, and the receiver store it. For example, when transmitting 32-bit bytes from a 32-bit word-length system to a 36-bit word-length system, it may be desirable (for reasons of efficiency and usefulness) to store the 32-bit bytes right-justified in a 36-bit word in the latter system. In any case, the user should have the option of specifying data representation and transformation functions. It should be noted that FTP provides for very limited data type representations. Transformations desired beyond this limited capability should be performed by the user directly.

3.1.1. DATA TYPES

Data representations are handled in FTP by a user specifying a representation type. This type may implicitly (as in ASCII or EBCDIC) or explicitly (as in Local byte) define a byte size for interpretation which is referred to as the "logical byte size." Note that this has nothing to do with the byte size used for transmission over the data connection, called the "transfer byte size", and the two should not be confused. For example, NVT-ASCII has a logical byte size of 8 bits. If the type is Local byte, then the TYPE command has an obligatory second parameter specifying the logical byte size. The transfer byte size is always 8 bits.

3.1.1.1. ASCII TYPE

This is the default type and must be accepted by all FTP implementations. It is intended primarily for the transfer of text files, except when both hosts would find the EBCDIC type more convenient.
The sender converts the data from an internal character representation to the standard 8-bit NVT-ASCII representation (see the Telnet specification). The receiver will convert the data from the standard form to his own internal form. In accordance with the NVT standard, the <CRLF> sequence should be used where necessary to denote the end of a line of text. Using the standard NVT-ASCII representation means that data must be interpreted as 8-bit bytes. The Format parameter for ASCII and EBCDIC types is discussed below.

3.1.1.2. EBCDIC TYPE

This type is intended for efficient transfer between hosts which use EBCDIC for their internal character representation.
For transmission, the data are represented as 8-bit EBCDIC characters. The character code is the only difference between the functional specifications of EBCDIC and ASCII types.

3.1.1.3. IMAGE TYPE

The data are sent as contiguous bits which, for transfer, are packed into the 8-bit transfer bytes. The receiving site must store the data as contiguous bits. The structure of the storage system might necessitate the padding of the file (or of each record, for a record-structured file) to some convenient boundary (byte, word or block). This padding, which must be all zeros, may occur only at the end of the file (or at the end of each record) and there must be a way of identifying the padding bits so that they may be stripped off if the file is retrieved. The padding transformation should be well publicized to enable a user to process a file at the storage site.
Image type is intended for the efficient storage and retrieval of files and for the transfer of binary data. It is recommended that this type be accepted by all FTP implementations.

3.1.1.4. LOCAL TYPE

The data is transferred in logical bytes of the size specified by the obligatory second parameter, Byte size. The value of Byte size must be a decimal integer; there is no default value. The logical byte size is not necessarily the same as the transfer byte size. If there is a difference in byte sizes, then the logical bytes should be packed contiguously, disregarding transfer byte boundaries and with any necessary padding at the end. When the data reaches the receiving host, it will be transformed in a manner dependent on the logical byte size and the particular host. This transformation must be invertible (i.e., an identical file can be retrieved if the same parameters are used) and should be well publicized by the FTP implementors.
For example, a user sending 36-bit floating-point numbers to a host with a 32-bit word could send that data as Local byte with a logical byte size of 36. The receiving host would then be expected to store the logical bytes so that they could be easily manipulated; in this example putting the 36-bit logical bytes into 64-bit double words should suffice.

3.1.1.5. FORMAT CONTROL

The types ASCII and EBCDIC also take a second (optional) parameter; this is to indicate what kind of vertical format control, if any, is associated with a file. The following data representation types are defined in FTP:
A character file may be transferred to a host for one of three purposes: for printing, or storage and later retrieval, or for processing. If a file is sent for printing, the receiving host must know how the vertical format control is represented. In the second case, it must be possible to store a file at a host and then retrieve it later in exactly the same form. Finally, it should be possible to move a file from one host to another and process the file at the second host without undue trouble. A single ASCII or EBCDIC format does not satisfy all these conditions.

3.1.2. DATA STRUCTURES

In addition to different representation types, FTP allows the structure of a file to be specified. Three file structures are defined in FTP:
? file-structure, where there is no internal structure and the file is considered to be a continuous sequence of data bytes,
? record-structure, where the file is made up of sequential records, and
? page-structure, where the file is made up of independent indexed pages.

3.1.2.1. FILE STRUCTURE

File structure is the default to be assumed if the STRUcture command has not been used. In file-structure there is no internal structure and the file is considered to be a continuous sequence of data bytes.

3.1.2.2. RECORD STRUCTURE

Record structures must be accepted for "text" files (i.e., files with TYPE ASCII or EBCDIC) by all FTP implementations. In record-structure the file is made up of sequential records.

3.1.2.3. PAGE STRUCTURE

To transmit files that are discontinuous, FTP defines a page structure. Files of this type are sometimes known as "random access files" or even as "holey files". In these files there is sometimes other information associated with the file as a whole (e.g., a file descriptor), or with a section of the file (e.g., page access controls), or both.
In FTP, the sections of the file are called pages. To provide for various page sizes and associated information, each page is sent with a page header. The page header has the following defined fields:
Header Length: The number of logical bytes in the page header including this byte. The minimum header length is 4.
Page Index: The logical page number of this section of the file. This is not the transmission sequence number of this page, but the index used to identify this page of the file.
Data Length: The number of logical bytes in the page data. The minimum data length is 0.
Optional Fields: Further header fields may be used to supply per page control information, for example, per page access control. All fields are one logical byte in length.
A note of caution about parameters: a file must be stored and retrieved with the same parameters if the retrieved version is to be identical to the version originally transmitted. Conversely, FTP implementations must return a file identical to the original if the parameters used to store and retrieve a file are the same.

3.2. ESTABLISHING DATA CONNECTIONS

The mechanics of transferring data consists of setting up the data connection to the appropriate ports and choosing the parameters for transfer. Both the user and the server-DTPs have a default data port. The user-process default data port is the same as the control connection port (i.e., U). The server-process default data port is the port adjacent to the control connection port.
The transfer byte size is 8-bit bytes. This byte size is relevant only for the actual transfer of the data; it has no bearing on representation of the data within a host's file system. The passive data transfer process (this may be a user-DTP or a second server-DTP) shall "listen" on the data port prior to sending a transfer request command. The FTP request command determines the direction of the data transfer. The server, upon receiving the transfer request, will initiate the data connection to the port. When the connection is established, the data transfer begins between DTP's, and the server-PI sends a confirming reply to the user-PI.
Every FTP implementation must support the use of the default data ports, and only the USER-PI can initiate a change to non-default ports. It is possible for the user to specify an alternate data port by use of the PORT command. The user may want a file dumped on a TAC line printer or retrieved from a third party host. In the latter case, the user-PI sets up control connections with both server-PI's. One server is then told (by an FTP command) to "listen" for a connection which the other will initiate. The user-PI sends one server-PI a PORT command indicating the data port of the other. Finally, both are sent the appropriate transfer commands. The exact sequence of commands and replies sent between the user-controller and the servers is defined in the Section on FTP Replies.
In general, it is the server's responsibility to maintain the data connection--to initiate it and to close it. The exception to this is when the user-DTP is sending the data in a transfer mode that requires the connection to be closed to indicate EOF. The server MUST close the data connection under the following conditions:
1. The server has completed sending data in a transfer mode that requires a close
to indicate EOF.
2. The server receives an ABORT command from the user.
3. The port specification is changed by a command from the user.
4. The control connection is closed legally or otherwise.
5. An irrecoverable error condition occurs.

Otherwise the close is a server option, the exercise of which the server must indicate to the user-process by either a 250 or 226 reply only.

3.3. DATA CONNECTION MANAGEMENT

Default Data Connection Ports: All FTP implementations must support use of the default data connection ports, and only the User-PI may initiate the use of non-default ports. Negotiating Non-Default Data Ports: The User-PI may specify a non-default user side data port with the PORT command. The User-PI may request the server side to identify a non-default server side data port with the PASV command. Since a connection is defined by the pair of addresses, either of these actions is enough to get a different data connection, still it is permitted to do both commands to use new ports on both ends of the data connection. Reuse of the Data Connection: When using the stream mode of data transfer the end of the file must be indicated by closing the connection. This causes a problem if multiple files are to be transfered in the session, due to need for TCP to hold the connection record for a time out period to guarantee the reliable communication. Thus the connection can not be reopened at once. There are two solutions to this problem. The first is to negotiate a non-default port. The second is to use another transfer mode.

3.4. TRANSMISSION MODES

The next consideration in transferring data is choosing the appropriate transmission mode. There are three modes: one which formats the data and allows for restart procedures; one which also compresses the data for efficient transfer; and one which passes the data with little or no processing. In this last case the mode interacts with the structure attribute to determine the type of processing. In the compressed mode, the representation type determines the filler byte.
All data transfers must be completed with an end-of-file (EOF) which may be explicitly stated or implied by the closing of the data connection. For files with record structure, all the end-of-record markers (EOR) are explicit, including the final one. For files transmitted in page structure a "last-page" page type is used.

NOTE: Byte means "transfer byte" except where explicitly stated otherwise.

The following transmission modes are defined in FTP:

3.4.1. STREAM MODE

The data is transmitted as a stream of bytes. There is no restriction on the representation type used; record structures are allowed. In a record structured file EOR and EOF will each be indicated by a two-byte control code. The first byte of the control code will be all ones, the escape character. The second byte will have the low order bit on and zeros elsewhere for EOR and the second low order bit on for EOF; that is, the byte will have value 1 for EOR and value 2 for EOF. EOR and EOF may be indicated together on the last byte transmitted by turning both low order bits on (i.e., the value 3). If a byte of all ones was intended to be sent as data, it should be repeated in the second byte of the control code. If the structure is a file structure, the EOF is indicated by the sending host closing the data connection and all bytes are data bytes.

3.4.2. BLOCK MODE

The file is transmitted as a series of data blocks preceded by one or more header bytes. The header bytes contain a count field, and descriptor code. The count field indicates the total length of the data block in bytes, thus marking the beginning of the next data block (there are no filler bits). The descriptor code defines: last block in the file (EOF) last block in the record (EOR), restart marker (see the Section on Error Recovery and Restart) or suspect data (i.e., the data being transferred is suspected of errors and is not reliable).This last code is NOT intended for error control within FTP. It is motivated by the desire of sites exchanging certain types of data (e.g., seismic or weather data) to send and receive all the data despite local errors (such as "magnetic tape read errors"), but to indicate in the transmission that certain portions are suspect). Record structures are allowed in this mode, and any representation type may be used. The header consists of the three bytes. Of the 24 bits of header information, the 16 low order bits shall represent byte count, and the 8 high order bits shall represent descriptor codes. The descriptor codes are indicated by bit flags in the descriptor byte. Four codes have been assigned, where each code number is the decimal value of the corresponding bit in the byte.
Code Meaning
128 End of data block is EOR
64 End of data block is EOF
32 Suspected errors in data block
16 Data block is a restart marker

3.4.3. COMPRESSED MODE

There are three kinds of information to be sent: regular data, sent in a byte string; compressed data, consisting of replications or filler; and control information, sent in a
two-byte escape sequence. If n>0 bytes (up to 127) of regular data are sent, these n bytes are preceded by a byte with the left-most bit set to 0 and the right-most 7 bits containing the number n. A string of n filler bytes can be compressed into a single byte, where the filler byte varies with the representation type.
Compressed mode is useful for obtaining increased bandwidth on very large network transmissions at a little extra CPU cost. It can be most effectively used to reduce the size of printer files such as those generated by RJE hosts.

3.5. ERROR RECOVERY AND RESTART

There is no provision for detecting bits lost or scrambled in data transfer; this level of error control is handled by the TCP. However, a restart procedure is provided to protect users from gross system failures (including failures of a host, an FTP-process, or the underlying network). The restart procedure is defined only for the block and compressed modes of data transfer. It requires the sender of data to insert a special marker code in the data stream with some marker information. The marker information has meaning only to the sender, but must consist of printable characters in the default or negotiated language of the control connection (ASCII or EBCDIC). The marker could represent a bit-count, a record-count, or any other information by which a system may identify a data checkpoint. The receiver of data, if it implements the restart procedure, would then mark the corresponding position of this marker in the receiving system, and return this information to the user. In the event of a system failure, the user can restart the data transfer by identifying the marker point with the FTP restart procedure. The following example illustrates the use of the restart procedure. The sender of the data inserts an appropriate marker block in the data stream at a convenient point. The receiving host marks the corresponding data point in its file system and conveys the last known sender and receiver marker information to the user, either directly or over the control connection in a 110 reply (depending on who is the sender). In the event of a system failure, the user or controller process restarts the server at the last server marker by sending a restart command with server's marker code as its argument. The restart command is transmitted over the control connection and is immediately followed by the command (such as RETR, STOR or LIST) which was being executed when the system failure occurred.

4. FILE TRANSFER FUNCTIONS

The communication channel from the user-PI to the server-PI is established as a TCP connection from the user to the standard server port. The user protocol interpreter is responsible for sending FTP commands and interpreting the replies received; the server-PI interprets commands, sends replies and directs its DTP to set up the data connection and transfer the data. If the second party to the data transfer (the passive transfer process) is the user-DTP, then it is governed through the internal protocol of the user-FTP host; if it is a second server-DTP, then it is governed by its PI on command from the user-PI. The FTP replies are discussed in the next section. In the description of a few of the commands in this section, it is helpful to be explicit about the possible replies.

4.1. FTP COMMANDS

4.1.1. ACCESS CONTROL COMMANDS

The following commands specify access control identifiers (command codes are shown in parentheses).

USER NAME (USER): The argument field is a Telnet string identifying the user. The user identification is that which is required by the server for access to its file system. This command will normally be the first command transmitted by the user after the control connections are made (some servers may require this). Additional identification information in the form of a password and/or an account command may also be required by some servers. Servers may allow a new USER command to be entered at any point in order to change the access control and/or accounting information. This has the effect of flushing any user, password, and account information already supplied and beginning the login sequence again. All transfer parameters are unchanged and any file transfer in progress is completed under the old access control parameters.

PASSWORD (PASS): The argument field is a Telnet string specifying the user's password. This command must be immediately preceded by the user name command, and, for some sites, completes the user's identification for access control. Since password information is quite sensitive, it is desirable in general to "mask" it or suppress typeout. It appears that the server has no foolproof way to achieve this. It is therefore the responsibility of the user-FTP process to hide the sensitive password information.

ACCOUNT (ACCT): The argument field is a Telnet string identifying the user's account. The command is not necessarily related to the USER command, as some sites may require an account for login and others only for specific access, such as storing files. In the latter case the command may arrive at any time. There are reply codes to differentiate these cases for the automation: when account information is required for login, the response to a successful PASSword command is reply code332. On the other hand, if account information is NOT required for login, the reply to a successful PASSword command is 230; and if the account information is needed for a command issued later in the dialogue, the server should return a 332 or 532 reply depending on whether it stores (pending receipt of the ACCounT command) or discards the command, respectively.

CHANGE WORKING DIRECTORY (CWD): This command allows the user to work with a different directory or dataset for file storage or retrieval without altering his login or accounting information. Transfer parameters are similarly unchanged. The argument is a pathname specifying a directory or other system dependent file group designator.
LOGOUT (QUIT): This command terminates a USER and if file transfer is not in progress, the server closes the control connection. If file transfer is in progress, the connection will remain open for result response and the server will then close it. If the user-process is transferring files for several USERs but does not wish to close and then reopen connections for each, then the REIN command should be used instead of QUIT. An unexpected close on the control connection will cause the server to take the effective action of an abort (ABOR) and a logout (QUIT).

4.1.2. TRANSFER PARAMETER COMMANDS

All data transfer parameters have default values, and the commands specifying data transfer parameters are required only if the default parameter values are to be changed. The default value is the last specified value, or if no value has been specified, the standard default value is as stated here. This implies that the server must "remember" the applicable default values. The commands may be in any order except that they must precede the FTP service request. The following commands specify data transfer parameters:

DATA PORT (PORT)

The argument is a HOST-PORT specification for the data port to be used in data connection. There are defaults for both the user and server data ports, and under normal circumstances this command and its reply are not needed. If this command is used, the argument is the concatenation of a 32-bit internet host address and a 16-bit TCP port address. This address information is broken into 8-bit fields and the value of each field is transmitted as a decimal number (in character string representation). The fields are separated by commas. A port command would be: PORT h1,h2,h3,h4,p1,p2 where h1 is the high order 8 bits of the internet host address.

PASSIVE (PASV)

This command requests the server-DTP to "listen" on a data port (which is not its default data port) and to wait for a connection rather than initiate one upon receipt of a transfer command. The response to this command includes the host and port address this server is listening on.

REPRESENTATION TYPE (TYPE)

The argument specifies the representation type as described in the Section on Data Representation and Storage. Several types take a second parameter. The first parameter is denoted by a single Telnet character, as is the second Format parameter for ASCII and EBCDIC; the second parameter for local byte is a decimal integer to indicate Bytesize.

FILE STRUCTURE (STRU)

The argument is a single Telnet character code specifying file structure described in the Section on Data Representation and Storage. The following codes are assigned for structure:
F - File (no record structure)
R - Record structure
P - Page structure
The default structure is File.

TRANSFER MODE (MODE)

The argument is a single Telnet character code specifying the data transfer modes described in the Section on Transmission Modes.
The following codes are assigned for transfer modes:
S - Stream
B - Block
C - Compressed
The default transfer mode is Stream.

4.1.3. FTP SERVICE COMMANDS

The FTP service commands define the file transfer or the file system function requested by the user. The argument of an FTP service command will normally be a pathname. The syntax of pathnames must conform to server site conventions (with standard defaults applicable), and the language conventions of the control connection. The suggested default handling is to use the last specified device, directory or file name, or the standard default defined for local users. The commands may be in any order except that a "rename from" command must be followed by a "rename to" command and the restart command must be followed by the interrupted service command (e.g., STOR or RETR). The data, when transferred in response to FTP service commands, shall always be sent over the data connection, except for certain informative replies. The following commands specify FTP service requests:

RETRIEVE (RETR): This command causes the server-DTP to transfer a copy of the file, specified in the pathname, to the server- or user-DTP at the other end of the data connection. The status and contents of the file at the server site shall be unaffected.

STORE (STOR): This command causes the server-DTP to accept the data transferred via the data connection and to store the data as a file at the server site. If the file specified in the pathname exists at the server site, then its contents shall be replaced by the data being transferred. A new file is created at the server site if the file specified in the pathname does not already exist.

STORE UNIQUE (STOU): This command behaves like STOR except that the resultant file is to be created in the current directory under a name unique to that directory. The 250 Transfer Started response must include the name generated.

APPEND (with create) (APPE): This command causes the server-DTP to accept the data transferred via the data connection and to store the data in a file at the server site. If the file specified in the pathname exists at the server site, then the data shall be appended to that file; otherwise the file specified in the pathname shall be created at the server site.

ALLOCATE (ALLO): This command may be required by some servers to reserve sufficient storage to accommodate the new file to be transferred. The argument shall be a decimal integer representing the number of bytes (using the logical byte size) of storage to be reserved for the file. For files sent with record or page structure a maximum record or page size (in logical bytes) might also be necessary; this is indicated by a decimal integer in a second argument field of the command. This second argument is optional, but when present should be separated from the first by the three Telnet characters <SP> R <SP>. This command shall be followed by a STORe or APPEnd command. The ALLO command should be treated as a NOOP (no operation) by those servers which do not require that the maximum size of the file be declared beforehand, and those servers interested in only the maximum record or page size should accept a dummy value in the first argument and ignore it.

RESTART (REST): The argument field represents the server marker at which file transfer is to be restarted. This command does not cause file transfer but skips over the file to the specified data checkpoint. This command shall be immediately followed by the appropriate FTP service command which shall cause file transfer to resume.

RENAME FROM (RNFR): This command specifies the old pathname of the file which is to be renamed. This command must be immediately followed by a "rename to" command specifying the new file pathname.

ABORT (ABOR): This command tells the server to abort the previous FTP service command and any associated transfer of data. The abort command may require "special action", as discussed in the Section on FTP Commands, to force recognition by the server. No action is to be taken if the previous command has been completed (including data transfer). The control connection is not to be closed by the server, but the data connection must be closed. There are two cases for the server upon receipt of this command: (1) the FTP service command was already completed, or (2) the FTP service command is still in progress. In the first case, the server closes the data connection (if it is open) and responds with a 226 reply, indicating that the abort command was successfully processed. In the second case, the server aborts the FTP service in progress and closes the data connection, returning a 426 reply to indicate that the service request terminated abnormally. The server then sends a 226 reply, indicating that the abort command was successfully processed.

DELETE (DELE): This command causes the file specified in the pathname to be deleted at the server site. If an extra level of protection is desired (such as the query,"Do you really wish to delete?"), it should be provided by the user-FTP process.

REMOVE DIRECTORY (RMD): This command causes the directory specified in the pathname to be removed as a directory (if the pathname is absolute) or as a subdirectory of the current working directory (if the pathname is relative).

MAKE DIRECTORY (MKD): This command causes the directory specified in the pathname to be created as a directory (if the pathname is absolute) or as a subdirectory of the current working directory (if the pathname is relative).

PRINT WORKING DIRECTORY (PWD): This command causes the name of the current working directory to be returned in the reply.

LIST (LIST): This command causes a list to be sent from the server to the passive DTP. If the pathname specifies a directory or other group of files, the server should transfer a list of files in the specified directory. If the pathname specifies a file then the server should send current information on the file. A null argument implies the user's current working or default directory. The data transfer is over the data connection in type ASCII or type EBCDIC. (The user must ensure that the TYPE is appropriately ASCII or EBCDIC). Since the infor
Friday, August 23rd 2002 - 06:14:37 AM
what your parents call you: mika
what planet are you from??: eart
so i can reach you: asd@asd.com
Homepage URL: http://asd.com
where am I???: wondering through
whats a guestbook without a comment???:1. INTRODUCTION

The objectives of FTP are 1) to promote sharing of files (computer programs and/or data), 2) to encourage indirect or implicit (via programs) use of remote computers, 3) to shield a user from variations in file storage systems among hosts, and 4) to transfer data reliably and efficiently. FTP, though usable directly by a user at a terminal, is designed mainly for use by programs.
The attempt in this specification is to satisfy the diverse needs of users of maxi-hosts, mini-hosts, personal workstations, and TACs, with a simple, and easily implemented protocol design.


2. OVERVIEW

In this section, the history, the terminology, and the FTP model are discussed. The terms defined in this section are only those that have special significance in FTP. Some of the terminology is very specific to the FTP model.

2.1. HISTORY
FTP has had a long evolution over the years. Appendix III is a chronological compilation of Request for Comments documents relating to FTP. These include the first proposed file transfer mechanisms in 1971 that were developed for implementation on hosts at M.I.T. (RFC 114), plus comments and discussion in RFC 141. RFC 172 provided a user-level oriented protocol for file transfer between host computers (including terminal IMPs). A revision of this as RFC 265, restated FTP for additional review, while RFC 281 suggested further changes. The use of a "Set Data Type" transaction was proposed in RFC 294 in January 1982. RFC 354 obsoleted RFCs 264 and 265. The File Transfer Protocol was now defined as a protocol for file transfer between HOSTs on the ARPANET, with the primary function of FTP defined as transfering files efficiently and reliably among hosts and allowing the convenient use of remote file storage capabilities. RFC 385 further commented on errors, emphasis points, and additions to the protocol, while RFC 414 provided a status report on the working server and user FTPs. RFC 430, issued in 1973, (among other RFCs too numerous to mention) presented further comments on FTP. Finally, an "official" FTP document was published as RFC 454.
By July 1973, considerable changes from the last versions of FTP were made, but the general structure remained the same. RFC 542 was published as a new "official" specification to reflect these changes. However, many implementations based on the older specification were not updated. In 1974, RFCs 607 and 614 continued comments on FTP. RFC 624 proposed further design changes and minor modifications. In 1975, RFC 686 entitled, "Leaving Well Enough Alone", discussed the differences between all of the early and later versions of FTP. RFC 691 presented a minor revision of RFC 686, regarding the subject of print files.
Motivated by the transition from the NCP to the TCP as the underlying protocol, a phoenix was born out of all of the above efforts in RFC 765 as the specification of FTP for use on TCP.

2.2. TERMINOLOGY

ASCII: The ASCII character set is as defined in the ARPA-Internet Protocol Handbook. In FTP, ASCII characters are defined to be the lower half of an eight-bit code set (i.e., the most significant bit is zero).

Access controls: Access controls define users' access privileges to the use of a system, and to the files in that system. Access controls are necessary to prevent unauthorized or accidental use of files. It is the prerogative of a server-FTP process to invoke access controls.

Byte size: There are two byte sizes of interest in FTP: the logical byte size of the file, and the transfer byte size used for the transmission of the data. The transfer byte size is always 8 bits. The transfer byte size is not necessarily the byte size in which data is to be stored in a system, nor the logical byte size for interpretation of the structure of the data.

Control connection: The communication path between the USER-PI and SERVER-PI for the exchange of commands and replies. This connection follows the Telnet Protocol.

Data connection: A full duplex connection over which data is transferred, in a specified mode and type. The data transferred may be a part of a file, an entire file or a number of files. The path may be between a server-DTP and a user-DTP, or between two server-DTPs.

Data port: The passive data transfer process "listens" on the data port for a connection from the active transfer process in order to open the data connection.

DTP: The data transfer process establishes and manages the data connection. The DTP can be passive or active.

End-of-Line: The end-of-line sequence defines the separation of printing lines. The sequence is Carriage Return, followed by Line Feed.

EOF: The end-of-file condition that defines the end of a file being transferred.

EOR: The end-of-record condition that defines the end of a record being transferred.

Error recovery: A procedure that allows a user to recover from certain errors such as failure of either host system or transfer process. In FTP, error recovery may involve restarting a file transfer at a given checkpoint.

FTP commands: A set of commands that comprise the control information flowing from the user-FTP to the server-FTP process.

File: An ordered set of computer data (including programs), of arbitrary length, uniquely identified by a pathname.

Mode: The mode in which data is to be transferred via the data connection. The mode defines the data format during transfer including EOR and EOF. The transfer modes defined in FTP are described in the Section on Transmission Modes.

NVT: The Network Virtual Terminal as defined in the Telnet Protocol.

NVFS: The Network Virtual File System. A concept which defines a standard network file system with standard commands and pathname conventions.

Page: A file may be structured as a set of independent parts called pages. FTP supports the transmission of discontinuous files as independent indexed pages.

Pathname: Pathname is defined to be the character string which must be input to a file system by a user in order to identify a file. Pathname normally contains device and/or directory names, and file name specification. FTP does not yet specify a standard pathname convention. Each user must follow the file naming conventions of the file systems involved in the transfer.

PI: The protocol interpreter. The user and server sides of the protocol have distinct roles implemented in a user-PI and a server-PI.

Record: A sequential file may be structured as a number of contiguous parts called records. Record structures are supported by FTP but a file need not have record structure.

Reply: A reply is an acknowledgment (positive or negative) sent from server to user via the control connection in response to FTP commands. The general form of a reply is a completion code (including error codes) followed by a text string. The codes are for use by programs and the text is usually intended for human users.

Server-DTP: The data transfer process, in its normal "active" state, establishes the data connection with the "listening" data port. It sets up parameters for transfer and storage, and transfers data on command from its PI. The DTP can be placed in a "passive" state to listen for, rather than initiate a connection on the data port.

Server-FTP process: A process or set of processes which perform the function of file transfer in cooperation with a user-FTP process and, possibly, another server. The functions consist of a protocol interpreter (PI) and a data transfer process (DTP).

Server-PI: The server protocol interpreter "listens" on Port L for a connection from a user-PI and establishes a control communication connection. It receives standard FTP commands from the user-PI, sends replies, and governs the server-DTP.

Type: The data representation type used for data transfer and storage. Type implies certain transformations between the time of data storage and data transfer. The representation types defined in FTP are described in the Section on Establishing Data Connections.

User: A person or a process on behalf of a person wishing to obtain file transfer service. The human user may interact directly with a server-FTP process, but use of a user-FTP process is preferred since the protocol design is weighted towards automata.

User-DTP: The data transfer process "listens" on the data port for a connection from a server-FTP process. If two servers are transferring data between them, the user-DTP is inactive.

User-FTP process: A set of functions including a protocol interpreter, a data transfer process and a user interface which together perform the function of file transfer in cooperation with one or more server-FTP processes. The user interface allows a local language to be used in the command-reply dialogue with the user.

User-PI: The user protocol interpreter initiates the control connection from its port U to the server-FTP process, initiates FTP commands, and governs the user-DTP if that process is part of the file transfer.



2.3. THE FTP MODEL

With the above definitions in mind, the following model (shown in Figure 1) may be diagrammed for an FTP service.


Figure 1 Model for FTP Use

In the model described in Figure 1, the user-protocol interpreter initiates the control connection. The control connection follows the Telnet protocol. At the initiation of the user, standard FTP commands are generated by the user-PI and transmitted to the server process via the control connection. (The user may establish a direct control connection to the server-FTP, from a TAC terminal for example, and generate standard FTP commands independently, bypassing the user-FTP process.) Standard replies are sent from the server-PI to the user-PI over the control connection in response to the commands. The FTP commands specify the parameters for the data connection (data port, transfer mode, representation type, and structure) and the nature of file system operation (store, retrieve, append, delete, etc.). The user-DTP or its designate should "listen" on the specified data port, and the server initiate the data connection and data transfer in accordance with the specified parameters. It should be noted that the data port need not be in File Transfer Protocol the same host that initiates the FTP commands via the control connection, but the user or the user-FTP process must ensure a "listen" on the specified data port. It ought to also be noted that the data connection may be used for simultaneous sending and receiving.
In another situation a user might wish to transfer files between two hosts, neither of which is a local host. The user sets up control connections to the two servers and then arranges for a data connection between them. In this manner, control information is passed to the user-PI but data is transferred between the server data transfer processes.

The Relationship between FTP and Telnet:

The FTP uses the Telnet protocol on the control connection. This can be achieved in two ways: first, the user-PI or the server-PI may implement the rules of the Telnet Protocol directly in their own procedures; or, second, the user-PI or the server-PI may make use of the existing Telnet module in the system. Ease of implementaion, sharing code, and modular programming argue for the second approach. Efficiency and independence argue for the first approach. In practice, FTP relies on very little of the Telnet Protocol, so the first approach does not necessarily involve a large amount of code.

3. DATA TRANSFER FUNCTIONS
Friday, August 23rd 2002 - 06:13:24 AM
what your parents call you: (that's a trick question!)
what planet are you from??: can't remember
so i can reach you: helpamom@20megsfree.com
Homepage URL: http://helpamom.20megsfree.com
where am I???: wondering through
whats a guestbook without a comment???:Your doing a great job. Love your site.
Keep up the good work!
Tuesday, August 20th 2002 - 05:15:23 PM
what your parents call you: okihost
what planet are you from??: okiworld
so i can reach you: phone home
Homepage URL: http://www.okihost.com
where am I???: magiclly appeared
whats a guestbook without a comment???:Hey cool site.. If you ever need hosting you can contact me at www.okihost.com.. later
Tuesday, August 13th 2002 - 02:32:25 PM
[ Sign my Dreambook | Back to angelfire ]

This Dreambook brought to you by
DreamHost Web Hosting