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/
![]() |
|
![]() |
|
![]() |
|
![]() |
All over the world, people carry with them walkmans and... Read More
IntroOne of the big advantages of PCs over earlier types... Read More
The following practice, if done regularly, may help you to... Read More
Viruses, software failures, power failures, human errors, hard drive failures... Read More
Getting started with video editing is very simple you only... Read More
For six years, my Samsung PC 13.8 inch SyncMaster conventional... Read More
As the Web grows more crowded and just plain "noisy"... Read More
Occupational Therapy Made EasierMedical downloads for the pda have improved... Read More
Digital Video Disc or as it is sometimes referred to... Read More
Feeling overwhelmed in selecting a new TV? With all the... Read More
With the new technology used to transfer information to from... Read More
So you've got some spyware, ad-ware, or viruses on your... Read More
Do you remember the old saw about how computers would... Read More
The Internet is an awesome tool, but be careful and... Read More
In Windows Xp, you can install two operating systems on... Read More
World War II - Germany decided to attack Poland. Poland... Read More
Microsoft Business Solutions is on the way to popularize it's... Read More
When browsing the internet you are likely to come across... Read More
Want to save money while promoting your web-based business? Of... Read More
Do you know how many fonts are currently installed on... Read More
File Transfer Protocol (FTP) is a protocol that is part... Read More
I've worked my way from the CCNA to the CCIE,... Read More
Using SQL Server 2000 and above versions you can retrieve... Read More
Have you ever tried to remove Spyware off your PC... Read More
You have your television and home theater receiver; you just... Read More
No matter how fast your processor and regardless of how... Read More
There are plenty of articles out there about how to... Read More
Maintaining your computer is extremely important ? especially if you... Read More
The best way to get the gaming computer that you... Read More
So you got yourself a digital camcorder. If you want... Read More
Tech support tells me to type 'regedt32' as opposed to... Read More
By using your computer today you can find a lot... Read More
Sometimes your PC will start acting strange for no apparent... Read More
When studying for your Cisco CCNA, CCNP, or CCIE exam,... Read More
Plasma and LCD TVs are the latest trend in home... Read More
Freezing is also known as crashing or hanging. It's frustrating.... Read More
The following practice, if done regularly, may help you to... Read More
Apache, MysQL and PHP for Windows could be a nice... Read More
This is not your typical lost data story. I was... Read More
GOT VIRUS? Your Data is NOT lost forever!In the wake... Read More
The year is 1981. IBM has just released the Personal... Read More
As the Web grows more crowded and just plain "noisy"... Read More
The technological horizon has always got something new to offer,... Read More
On 21 August 2003 Symantec Security Response upgraded the W32.SOBIG.F... Read More
You probably heard of the new Firefox browser version 1.0... Read More
Addressing a D2X Digital SLRCoolpix 8800 search, this article provides... Read More
Buying Your PCBuying a PC that's right for you and... Read More
We've all seen them, you've been browsing a website and... Read More
Are you looking for an MP3 player but am not... Read More
A friend told me: "My computer startup seems to be... Read More
The registry is where the computer stores information about the... Read More
1. Let your PC boot up completely before opening any... Read More
If you are a building a website or a forum,... Read More
Below you will find some useful information and comments about... Read More
World War II - Germany decided to attack Poland. Poland... Read More
Have you ever tried to remove Spyware off your PC... Read More
Tech support tells me to type 'regedt32' as opposed to... Read More
After reading this good article you will know some important... Read More
Are you stymied by the vast offerings in cheap mp3... Read More
This article describes the basic properties of color, what the... Read More
Each of the items in the checklist below is part... Read More
Good Morning Mr. Sampson. Please type in you Personal Identification... Read More
PDA Medical BenefitsIf you are concerned about your medical history,... Read More
For many people the computer industry is a seeming unsolvable... Read More
For those seeking to buy their first flat panel TV... Read More
IntroductionMac OS X is the most technologically advanced operating system... Read More
Personal Technology |