Page 249 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 249
Unit 13: FTP Server
connections that are initiated by the client are using ephemeral ports themselves, as it should notes
be. By opening two connections, or sockets with the FTP server, the client is able to resolve the
issue of its firewall denying access to the FTP server initiating contact on one of the client’s high
ephemeral ports.
One of the connections opened by the client will contact the FTP server on port 21, and issue it
the PASV (passive) command, vice the normal PORT command when using active FTP. Now
what happens is that the FTP server opens an ephemeral port and issues the PORT command
to the FTP client. With this in hand the client then starts a connection back to the server port for
the data transfer. It is a rather nifty way to deal with the aforementioned issue of Active FTP and
client firewalls.
Much like some other application layer protocols, FTP has its own set of status and error codes.
Just like HTTP, these numerical values will tell you what is going on with an established session.
Also much like HTTP status and error codes they are broken down into five groups. It is always
handy to have a link to a breakout of these nearby if you are investigating some traffic issues.
Well with that said, what would an article about a protocol be without a packet showing it in
action! Without further ado let’s take a look at one of them.
Task Analyze how does active and passive FTP work?
13.2 ftp (file transfer protocol)
File Transfer Protocol (FTP) is a TCP protocol for uploading and downloading files between
computers. FTP works on a client/server model. The server component is called an FTP daemon.
It constantly listens for FTP requests from remote clients. When a request is received, it manages
the the login and sets up the connection. For the duration of the session it executes any of
commands sent by the FTP client.
Access to an FTP server can be managed in two ways:
1. Anonymous
2. Authenticated
In the Anonymous mode, remote clients can access the FTP server by using the default user
account called ‘anonymous” or “ftp” and transfer an email address as the password. In the
Authenticated mode a user must have an account and a password. User access to the FTP server
directories and files is dependent on the permissions defined for the account used at login. As a
general rule, the FTP daemon will hide the root directory of the FTP server and change it to the
FTP Home directory. This hides the rest of the file system from remote sessions.
File Transfer Protocol (FTP), a standard Internet protocol, is the simplest way to exchange files
between computers on the Internet. Like the Hypertext Transfer Protocol (HTTP), which transfers
displayable Web pages and related files, and the Simple Mail Transfer Protocol (SMTP), which
transfers e-mail, FTP is an application protocol that uses the Internet’s TCP/IP protocols. FTP is
commonly used to transfer Web page files from their creator to the computer that acts as their
server for everyone on the Internet. It’s also commonly used to download programs and other
files to your computer from other servers.
As a user, you can use FTP with a simple command line interface (for example, from the Windows
MS-DOS Prompt window) or with a commercial program that offers a graphical user interface.
Your Web browser can also make FTP requests to download programs you select from a Web
page. Using FTP, you can also update (delete, rename, move, and copy) files at a server. You need
LoveLy professionaL university 243