File Transfer Protocol (FTP) is a protocol that is part of the TCP/IP suite. It is the standard for transferring large amounts of data from server to server and from servers to clients. There is a very good chance that you have downloaded files from FTP sites many times, though it may have seemed you were only downloading from a website. FTP allows you to transfer files over a variety of hosts with different operating systems and file systems. There are so many FTP servers on the Internet, some are private with secure logon names, other ones are public with anonymous logins.
This paper will give a very brief outline of how the FTP Protocol functions and give the basic commands used during an FTP session. Keep in mind that these commands are generally automatic and are executed by either an FTP Client application, or done via your web browser. Though these methods are generally quicker than manually connecting to an FTP, it doesn't mean we should ignore the background behind how the technology works.
The FTP Protocol uses two connections to transfer a file. Each of these connections is quite a bit different, but work in conjunction with each other. The first connection is the Control Connection, which as the name implies controls the connection in regards to initiating the data streams and executing the commands. The second type of connection is the Data Connection, this connection is the actual connection that passes the files back and forth between the client and server.
Control Connection:
The control connection starts in a normal client / server manner. The client does an active open connection to port 21 of the FTP server to establish the control connection. The server is listening on port 21 for any active queries. Please keep in mind that though the primary FTP port is designated as porn 21, many servers, especially private ones are running on non-standard ports. The control connection as I mentioned early is the connection that allows you to pass commands between the client and server. Commands that must be sent are ones like LIST, STOR, and RETR. Once you enter a command on the control connection, you initiate the data connection.
Data Connection:
The data connection is spawned each time a file is moved between the client and server. The Control connection initiates the transfer with the PORT command, this tells the server to open an active connection to the clients passive port. The port command is typically the IP address followed by a 16 bit port number. The PORT command is issued in the following fashion:
PORT 24,82,116,92,4,150
That command should spawn a response of: 200 PORT Command Successful
After the PORT command has been initiated and is successful the next command in the data connection will be issued from the control connection. As I mentioned before this is typically a LIST, RERT or STOR. I will outline the basic FTP commands below for reference.
FTP Commands (Basic):
ABOR - Abort command and any data transfers
LIST - List the directory contents
PASS password - Used during authentication of login
USER username - Used during authentication of login
QUIT - Logoff / Quit session
RETR filename - Retrieve file from server STOR filename - Send a file to the server
SYST - Show System information
TYPE - Set the type of data, for instance ASCII
PORT - n1,n2,n3,n4,n5,n6 ( 1-4 = ip address, 5-6 port data)
HELP - Will give you additional available commands and more information
Reply Codes:
Reply codes are simply confirmations of things happening. One example of a reply code was went we got "200 PORT Command Successful" there are a handful of other reply codes, though generally the main ones are as follows.
125: Data Connection Open Start Transfer
200: Command OK
221: Goodbye / Terminate Connection
252: Write Error
331: Username OK, Enter Password
425: Can't Open Data Connection
500: Syntax Error on Command
501: Syntax Error on Arguments
Client Applications:
There are many different clients for FTP, and really it's up to personal taste in the end. A couple of the major ones are CuteFTP and FlashFXP. Personally I use FlashFXP when I'm in the Windows Environment. Just go to a freeware website or search on the search engines for a FTP Client and try a few out!
Summary of FTP:
The File Transfer Protocol is a wonderful and useful standard that has helped move data around the world safely and reliably for years. Everyone uses it from uploading their website to their web server, backing up their data to an off-site location, sharing their pictures with friends, or disseminating large data files for scientific research!
For even more information on the FTP, check out RFC 959.
Ken Dennis
http://KenDennis-RSS.homeip.net/
|
|
|
|
|
|
|
|
|
|
|


Plasma and LCD TVs are the latest trend in home... Read More
Most people download and save so much information on their... Read More
So you got yourself a digital camcorder. If you want... Read More
The United States Of America citizen feels that games is... Read More
I am going to assume that you are running windows... Read More
The Internet can be a dangerous place.While you're enjoying the... Read More
If you don't have an mp3 player, and even if... Read More
MP3 players are Hot! Playing music has come a long... Read More
With the new technology used to transfer information to from... Read More
Enhanced Definition Television ? also known as EDTV ? is... Read More
Webmasters usually sit at their computers much longer in a... Read More
After another security hole recently surfaced in Microsoft's Windows operating... Read More
Maintaining your computer is extremely important ? especially if you... Read More
When I first started studying for my CCNP, some of... Read More
If you ask most people what frustrates them most about... Read More
Confused by EDTV vs HDTV? We don't blame you. The... Read More
JPEG, GIFF/JIFF, BMP, and TIFF are the most commonly used... Read More
Passwords have a strange dual nature. The stronger and safer... Read More
Surf the 'Net for about 10 minutes and chances rate... Read More
A computer needs a certain amount of information to operate;... Read More
By using your computer today you can find a lot... Read More
All of us are familiar with the pyramids of Egypt.... Read More
Computers are everywhere, and vary in specification, brands, sizes, shaped,... Read More
As the owner of a Country Mall and Top Site... Read More
The first step is: Start > My DocumentsSo you have... Read More
With a little tweaking and with proper tools, you can... Read More
Winter?the official start of the cold and flu season. Though,... Read More
MMC and SDFlash memory is available in so many formats... Read More
When you turn on your computer, does it act like... Read More
Nothing is worse than having to negotiate all kinds of... Read More
Windows Media Player 10 has been full of bugs from... Read More
If you're a computer expert, you'll probably already know about... Read More
About mail-mergingMail-merging is the process of merging variable data and... Read More


With the new technology used to transfer information to from... Read More
This article describes the basic properties of color, what the... Read More
I do a holiday letter every year and send them... Read More
Below you will find some useful information and comments about... Read More
Plenty! When we made the decision to be our own... Read More
As the web has evolved, so have the methods of... Read More
Heading off on vacation soon?Then perhaps you're tempted to take... Read More
The first step is: Start > My DocumentsSo you have... Read More
A Computer in Your HandCarrying around an address book and... Read More
Computers are everywhere, and vary in specification, brands, sizes, shaped,... Read More
Enhanced Definition Television ? also known as EDTV ? is... Read More
MP3 players are Hot! Playing music has come a long... Read More
Do you remember the old saw about how computers would... Read More
File Transfer Protocol (FTP) is a protocol that is part... Read More
Buying a receiver is one of the most important decisions... Read More
Many computer users are worried about their computer's performance. After... Read More
Computers are available in different shapes, sizes and weights, due... Read More
Digital cameras ratings are great tools for deciding which camera... Read More
Are you thinking of buying an Apple iPod? Or have... Read More
Have you ever thought about building your own computer system?... Read More
JPEG, GIFF/JIFF, BMP, and TIFF are the most commonly used... Read More
1. Before sitting down for coding, you must have formal... Read More
How familiar does the following sound? Your computer was working... Read More
Here are some tips on how to use screensavers:First of... Read More
OK, so you caught a computer virus and your system... Read More
Plasma and LCD TVs are the latest trend in home... Read More
Your first step in removing dangerous infections from your computer... Read More
1. Empty the Temp directory regularly. To do this, make... Read More
Most people download and save so much information on their... Read More
Flash mp3 players come with an exciting array of features,... Read More
As the Web grows more crowded and just plain "noisy"... Read More
Microsoft Business Solutions is on the way to popularize it's... Read More
You probably heard of the new Firefox browser version 1.0... Read More
Personal Technology |