Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/a26f9f83/public_html/articles/includes/config.php on line 159
FTP - File Transfer Protocol Explained > NetSparsh - Viral Content you Love & Share

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:

This RSS feed URL is deprecated, please update. New URLs can be found in the footers at https://news.google.com/news

New York Times

When a Tech Reporter Doesn't Use Much Tech
New York Times
How do New York Times journalists use technology in their jobs and in their personal lives? David Streitfeld, a technology reporter in San Francisco, discussed the tech he's using — and not using. For a tech journalist, you don't use a lot of tech ...


New York Times

The Benefits (and Limits) of Using Tech to Plan a Wedding
New York Times
Because of the deeply personal nature of a wedding, you can't just plan everything with a few taps on a smartphone or by sitting in front of a computer. Eventually you will have to talk to lots of people the old school way: on the phone or in person.


New York Times

How to Convert Photo Files in Bulk
New York Times
Q. I have hundreds of TIFF-formatted photos. Is there an efficient way to convert these photos to JPG all at once? A. Just as you can rename multiple photos at once through “batch processing,” you can convert a large collection of images from one file ...


88.9 KETR

Businesses Need To 'Mind The Gap' Between Office Tech And Personal Tech
88.9 KETR
Our personal technology commentator, Jeremy Gamez, comments on a recent article emphasizing that businesses wanting to attract the brightest young employees need to be sure that their office technology is as good as Millennials' personal technology.


New York Times

Add Pictures to Android Contacts
New York Times
Q. How do I add an Android contact photo for someone who doesn't already have one so I can see something besides initials in a circle? A. Start by opening the Contacts app on your Android device and selecting the contact you'd like to dress up with a ...


New York Times

How the 52 Places Traveler Stays Charged While Chronicling the World
New York Times
How do New York Times journalists use technology in their jobs and in their personal lives? Jada Yuan, who is crisscrossing the globe as The Times's 52 Places Traveler, discussed the tech she's using. You are endlessly traveling, and you must have to ...


New York Times

How to Go Back to the Old Gmail
New York Times
Q. I tried to get used to the new Gmail web design, but I just don't like it. Can I go back to the old one? A. For the time being, Google is keeping around the previous version of Gmail on the web, and you can revert to the old look from the inbox ...


New York Times

What Europe's Google Fine Means for Android Users
New York Times
American government officials have expressed interest in taking a tougher stance on regulating tech companies, but Europe has largely acted by itself in its regulatory actions against Silicon Valley titans. So other than Google's having to pay a big ...
Google quietly working on a replacement for Android, called Fuchsia, that's causing some fierce internal squabblingFinancial Post

all 515 news articles »

New York Times

Emergency Charging Options on the Road
New York Times
Likewise, the Federal Trade Commission has previously warned travelers about directly connecting phones to the USB jacks for the infotainment systems in rental cars because the phone could share personal data with the car's system, but a dedicated ...

and more »

New York Times

I Used Apple's New Controls to Limit a Teenager's iPhone Time (and ...
New York Times
Apple's new parental controls cut a teenager's iPhone use in half. It wasn't as effective on our personal tech columnist.

and more »
Google News

Password Nightmares

Good Morning Mr. Sampson. Please type in you Personal Identification... Read More

PC Owners - The Largest Criminal Gang Ever?

The year is 1981. IBM has just released the Personal... Read More

The Benefits of Open Source

If you are a building a website or a forum,... Read More

15 Good Programming Habits

1. Before sitting down for coding, you must have formal... Read More

Best PC Pocket GPS

Stop Getting LostOne of the greatest uses for a pocket... Read More

PDA Bible Free Download

Your Bible At Your FingertipsIt is fairly easy to find... Read More

Bios Term

BIOS - Basic Input Output SystemThe central processing unit of... Read More

Windows PDA Medical Software Benefits

PDA Medical BenefitsIf you are concerned about your medical history,... Read More

If You are the Only User on Your Windows XP Computer, Do You Think One User Account Is Enough?

I am going to assume that you are running windows... Read More

PC Tools Youd Never Think You Need

Do you use Windows standard uninstall feature? How do you... Read More

Passwords and the Human Factor

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

The Advantages of Portable MP3 Players

With their solid-state technology, compact size, and abundant memory, portable... Read More

10 Tips to SPEED Up Your PC

1. Let your PC boot up completely before opening any... Read More

Palm PC critique

I met an entrepreneur who hole heartedly disagree with an... Read More

Troubleshooting Computer Freeze (Lockup) Problems

How familiar does the following sound? Your computer was working... Read More

EDTV vs HDTV

Confused by EDTV vs HDTV? We don't blame you. The... Read More

HTML Explained: Part 1

Want to save money while promoting your web-based business? Of... Read More

Smart Apple iPod Tips and Techniques

Are you thinking of buying an Apple iPod? Or have... Read More

How To Buy An MP3 Player

Are you looking for an MP3 player but am not... Read More

Looking For an MP3 Player?

If you don't have an mp3 player, and even if... Read More

Top 9 Ways To Speed Up Your Surfing & Computing

It seems like fast never quite rates fast enough.No matter... Read More

Things You Can Do To Speed Up Your Computer

Upgrading your processor will always speed up your computer, but... Read More

Simple Overview Of Computer

Computer is an electronic machine work on the instructions of... Read More

What Exactly are Screensavers? - part I

After reading this good article you will know some important... Read More

More Cool Web Tricks

If you ask most people what frustrates them most about... Read More