Articles. News. Information.

Category of Information, News & Articles


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/


MORE RESOURCES:

Personal Tech: Phishing attacks get personal
Salt Lake Tribune, United States - Jan 5, 2009
By Kim Komando You know to watch for phishing attacks, which use e-mail messages purporting to be from legitimate businesses to trick you into divulging ...


BluePhone Personal Tech Experts Offer Five Tips for Building a ...
International Business Times, NY - Dec 23, 2008
Here are five tips to consider before you make your decision,according to BluePhone (www.bluephone.com), the Personal Tech Supporthotline that helps ...


Personal Tech 'Zune 30 Midnight Meltdown' Angers Music Lovers
CIO Today, CA - Dec 31, 2008
Web forums are churning with angry reports of frozen 30GB Microsoft Zunes, labeled a Z2K problem and the Zune 30 Midnight Meltdown. ...


Making connections, gadget to gadget
International Herald Tribune, France - Jan 7, 2009
(A gallery of some duds from past CES shows is at nytimes.com/personaltech.) This year there certainly are many efforts to create products so stupendous ...


BRIEF: Personal Tech: Student finds way to extend battery life
TMC Net, CT - Dec 22, 2008
Imagine your cell phone lasting 12 times longer than before and you see the potential of Atif Shamim's invention. The electronics PhD student from Carlton ...


Personal tech to be focus of trade show
Daily Gleaner, Canada - Jan 8, 2009
By LUANN LASALLE MONTREAL - The television, the grande dame of household technology, should have a starring role again at this year's International Consumer ...


Solutions: Tips for troubleshooting in Internet Explorer
Tampabay.com, FL - Jan 2, 2009
Send questions to personaltech@sptimes.com or Personal Tech, PO Box 1121, St. Petersburg, FL 33731. Questions are answered only in this column.


Personal Tech LG Announces Broadband HDTV with Netflix Built In
CIO Today, CA - Jan 5, 2009
By Barry Levine LG Electronics will will add broadband and Netflix streaming software to its new high-definition TVs. LG's new sets will be shown at the ...


Blake Trchka: Central's go-to technology master
TheDoings-ClarendonHills.com, IL - Jan 6, 2009
Junior Blake Trchka of Clarendon Hills is the school's personal "tech guru". PHOTO COURTESY OF BLAKE TRCHKA Blake Trchka, 16, of Clarendon Hills works as a ...


Personal Tech Acer Launches Extreme Gaming Aspire Notebook
CIO Today, CA - Dec 29, 2008
By Jennifer LeClaire Acer America has launched the $1799 Aspire 8930G-7665 notebook for extreme gaming on the go with an 18.4-inch CineCrystal ...

Personal-Tech - Google News

Home | Sitemap
© 2006 eInfoJunction.com Homepage | Web Directory | Article Directory| Bid Directory