Electric Type

Multimedia

About Us

News

Help

FTP: For The People

Page 2 — Logging In

Connecting to an FTP server is very similar to connecting to just about any other server on the Web. When you log in to your Hotmail account or a secure shopping cart system (such as the one at Amazon.com), you have to provide a server address, a user name, and a password before you can exchange information with the server.

Let's take a look at an example login set for an FTP server.

site: ftp.fakesite.org
login: mcalore
pass: h4x0r4lyfe
port: 21

The first line in the example above, the site address, is simply the address of the FTP server that I'm connecting to. The "ftp" in the prefix of the URL identifies it as an FTP server. Pretty straightforward so far. The second and third lines are my user name and password, respectively. In this particular case, I have already had the server administrator set up a login account for me on the server. Even if I didn't have a login account, I still might be able to gain access to the server by logging in anonymously. We'll go into that more a little later.

The last line of the example login is the port number that I'm connecting to on the server. A port is best envisioned as a little door on the server. Most servers on the Web have a multitude of such doors, each with its own purpose. Each port number is dedicated to a corresponding application on the server, and the traffic intended for an application (such as an FTP server or Web server) passes through the application's dedicated door. Each port handles a specific type of transaction between the server and client. For example, the FTP protocol is handled by ports 20 and 21 by default. HTTP (the protocol that's used to serve Web pages to a browser) requests are handled by port 80.

Often, the port number will be attached to the end of the server's Web address, separated by a colon, like this:

ftp.fakesite.org:21

It isn't important that you know every single TCP/IP port for each Internet application out there, but you have to be able to recognize a port number when you see one. This becomes especially critical when you are connecting to servers that route FTP connections to other ports in their firewalls.

This quandry brings up the sometimes-confusing issue of passive FTP versus active FTP, two different modes of data transfer between a client and a server. Which one is being used depends on how the client and server firewalls are set up. Since this issue is beyond the scope of this article, I will point you to a detailed discussion of active versus passive FTP over at Slacksite.com. So don't be alarmed if you notice that your FTP connection is jumping to port 1013 all of sudden — that's just your data being routed via passive FTP.

Anonymous FTP

Many public servers on the Internet allow users to log in an download files via FTP by connecting anonymously. This is a very common practice in the world of open source and freely distributed software.

Now, let's get this clear. When you connect anonymously to an FTP server, you're not really anonymous in the truest sense. Most of the time, you are required to enter "anonymous" as your user name and your email address as your password. This is a gesture of courtesy toward the server administrators so that they can get some idea of who's logging in and downloading their files. Even if you are connecting anonymously and you aren't required to give any personal information during the connection process, any sysadmin worth her salt is logging your session. This means that if you do anything nasty or illegal, the server administrator has your number (quite literally, your host domain and IP address). You can be put on probation, blocked, or prosecuted. So, here's a tip to remember: anonymous is never really anonymous.

next page»


Tutorials Home  

CSS Reference  

Regular Expressions  

Image Filtering  

Adding Site Search  

Image Maps  

Browser Detection  

Fundamentals of XSSI  

FTP Tutorial  

HTML 4.0  

User Blogs

Screen Shots

Latest Updates

Contact Us

Valid HTML 4.01!
Valid CSS!

Breadcrumb

© ElectricType
Maintained by My-Hosts.com
Site map | Copyright | Disclaimer
Privacy policy | Acceptable Use Policy
Legal information.