FTP - File Transfer Protocol Explained

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/

In The News:


Washington Post

Stocks end lower on personal income data
Los Angeles Times, CA - 5 hours ago
Dell shares fell $3.48, or 14%, to $21.73 on its earnings report late Thursday and cautious comments about spending in the tech sector. ...
Market was Down on Consumer Spending and Personal Incomes Data Zacks.com
Stocks slide as personal income falls, crude rises SunJournal.com
Stocks & Bonds Shares Fall on Slow Consumer Spending New York Times
AHN - Kansas City Starall 589 news articles

RTT News

Slower spending hurts Dell, tech firms
Chicago Tribune, United States - 5 hours ago
Investors were uneasy after the Commerce Department reported that personal incomes fell by 0.7 percent in July, and consumer spending rose a modest 0.2 ...
Stocks to Open Lower BusinessWeek
Wall Street hit by bad news The Australian
Stocks slump on Dell, income data MSN Money
Forbes - CNBCall 251 news articles

Stocks end lower on personal income data
The Associated Press - 13 hours ago
Investors worried about the tech sector after Dell's report late Thursday and its cautious comments about spending in the sector. The stock fell $3.48, ...

StarPhoenix

US STOCKS-Wall St tumbles as Dell warns on tech spending
Reuters - 15 hours ago
A government report showed US personal income fell unexpectedly in July while spending slowed as the effects of a government stimulus package wore off. ...
US STOCKS-Dell warning on spending, oil weigh on Wall St guardian.co.uk
US STOCKS-Wall St tumbles as Dell warns on tech spending Reuters
US STOCKS-Disappointing Dell earnings, oil weigh on Wall St Reuters
all 1,633 news articles

Seattle Post Intelligencer

Issue of technology in presidential campaign debated
MiamiHerald.com, FL - 14 hours ago
Even though McCain may not be wired on a personal level, his campaign surely has a strong online presense. On Thursday, the first ad that popped up when you ...
Westlund looks forward to Biden’s help downticket PolitickerOR
Obama camp downplays Clinton backers at convention WOKV
MICHAEL SMERCONISH: Obama's pick creates GOP opportunity Modesto Bee
MiamiHerald.comall 1,853 news articles

Stocks Shaken While Oil Stirs
Forbes, NY - 16 hours ago
Tech stocks were the biggest drag on the market, as investors punished most of the sector's biggest names. Dell (nasdaq: DELL - news - people ) was the ...
Street Slips At Week's End Forbes
Street Softens As Gustav Pumps Oil Forbes
Street Slumps Into Holiday Forbes
Forbesall 5 news articles

Tech Test Drive: Deca Sports (Wii)
San Jose Mercury News,  USA - 13 hours ago
The bad: The game doesn't use personal Mii's, instead only letting you choose from preloaded teams and players. Games are over simplified for easy play. ...

Stocks fall on personal income data, Dell report
The Associated Press - 17 hours ago
Ahead of next week's figures concerns arose Friday about the tech sector after Dell's report. The company fell $3.22, or 13 percent, to $21.99 after the ...

Slumping tech shares pace pre-holiday pullback
SmallCapInvestor - 15 hours ago
Small-caps stocks drifted lower Friday, weighed down by losses in the tech sector and by troubling economic data on the personal income report. ...

Personal Tech: iPhone just got smarter
Salt Lake Tribune, United States - Aug 19, 2008
By Vince Horiuchi "Crash Kart,"a Mario Kart-like driving game, is shown running on Apple's new iPhone 3G. With all the hoopla over the iPhone 3G and its new ...
personal tech - Google News


Wind Chimes and more...

Windchimes for great gifts!

Passwords and the Human Factor

Passwords have a strange dual nature. The stronger and safer... Read More

SmartCar Memory Stick for LapTop Transfer Data

With the new technology used to transfer information to from... Read More

Classification of Computers

Computers are available in different shapes, sizes and weights, due... Read More

Do Higher Digital Camera Prices Mean Better Cameras?

Understanding digital camera prices makes finding the best camera value... Read More

Help, I Need a New HDTV! (Part 1 of 5)

Feeling overwhelmed in selecting a new TV? With all the... Read More

Computer Geeks and Garden Gnomes

First and foremost before I begin my ranting it is... Read More

Setting File Permissions On A Unix Server

File permissions are one of the strengths that the Unix... Read More

Make Windows XP Run Faster!

A friend told me: "My computer startup seems to be... Read More

Portable Technology: Getting to Know the Treo

Up until the recent past, those who wanted to take... Read More

Help, I Need a New HDTV! (Part 4 of 5)

Feeling overwhelmed in selecting a new TV? With all the... Read More

Portable DVD Players - Things To Know

In my humble opinion nothing makes a long trip easier... Read More

How To Have Two (Multiple) Copies Of Windows

Having two operating systems is not as difficult as many... Read More

Bluetooth Headphones For Your PDA

Nothing is worse than having to negotiate all kinds of... Read More

The Help Desk

When you think of a help desk, what do you... Read More

USB Drives - What to Look For in a USB Device

Those small USB drives have so many names, pocket drives,... Read More

Customize Your Portable Player with an MP3 Player Accessory

Everywhere you look today people are listening to personal audio... Read More

Compile .BAT Files into Native Windows Applications (.EXE)

Since the DOS days, batch files have been one of... Read More

Keeping the Windows Registry Operational

The registry is where the computer stores information about the... Read More

The Benefits of the New Firefox Browser

You probably heard of the new Firefox browser version 1.0... Read More

Put Order and Information into File Names

Unless you place your faith in internal search engine software... Read More

Is Online DVD Rental or Pay-Per-View the Best Way to Get Your Movies?

With renting methods such as online DVD rental and pay-per-view,... Read More

The Newbies Guide to Personal Computer Maintenance

When you turn on your computer, does it act like... Read More

Be Prepared in the Event Computer Disaster Strikes

ComputersBusinesses and individuals alike have all grown to rely on... Read More

Virtual Memory - What is It?

I recently got an e-mail asking about virtual memory. The... Read More

Flash Your nVidia Video Cards BIOS

You will need the following:1. 1.44MB FDD (floppy)2. NVFLASH utility... Read More