Published on 05/31/2016 5:54 am
AN INTRODUCTION TO FTP (File Transfer Protocol)

File Transfer Protocol

FTP (File Transfer Protocol) is the simplest and most secure way to exchange files over the Internet. Transferring files from a client computer to a server computer is called “uploading” and transferring from a server to a client is “downloading”. To access an FTP server, users must be able to connect to the internet or an intranet (via a modem or local area network) with an FTP client program. FTP doesn’t really move, it copies files from one computer to another. FTP is the file transfer protocol in the Internet’s TCP/IP protocol suite’s Application Layer.

Image title

Goals of FTP:

  • Sharing of files
  • Indirect use of remote computers
  • Handle different file systems
  • Transfer data reliably and efficiently

FTP Clients:

  • Some commonly used FTP clients that include the following:
  • FileZilla
  • Fire FTP
  • Dreamweaver

FTP steps:

  • Request
  • Response
  • Transfer
  • Terminate

Request:

This request is initiated by the client.

Allowing the FTP to begin

Sub-commands

                Store, delete, lookup, open and close

                Allows client to interact with the server before they download or upload a file.

Response:

Server will inform the client that it is ready to either receive or send a file.

The sub-commands used in this transaction are “ready to send” and “ready to receive”.

Transfer:

The actual transaction will occur in the transfer step.

Terminate:

Two types of terminate transactions

  •                 Successful terminate
  •                 Unsuccessful terminate

Data transfer modes:

STREAM: file is transmitted as a stream of bytes.

BLOCK: file is transmitted as a series of blocks preceded by headers containing count and descriptor code (EOF, EOR, restart marker).

COMPRESSED: uses a simple compression scheme – compressed blocks are transmitted.

Types of connection:

When an FTP client connects to an FTP server it opens a connection to the FTP control port 21. Then the client tells the FTP server whether to establish an active or passive connection.

The type of connection chosen by the client determines how the server responds and on what ports transactions will occur.

Active Connections:

When an active connection is established, the server opens a data connection to the client from port 20 to a high range port on the client machine.

All data from the server is then passed over this connection.

Passive Connections:

When a passive connection is established, the client asks the FTP server to establish a passive connection port, which can be on any port higher than 10,000.

The server then binds to this high-numbered port for this particular session and relays that port number back to the client. The client then opens the newly bound port for the data connection.

The FTP commands:

There are three different types of FTP commands:

  • Access control commands
  • Transfer parameter commands
  • Service Commands

NOTE:

FTP uses the services of TCP. It needs two TCP connections. The well-known port 21 is used for the control connection, and the well-known port 20 is used for data connection.

Also Read: How to Install WordPress Using FTP

FTP tips:

When retrieving non-text files, you must use Binary Mode, otherwise the file(s) get messed up.

FTP is case sensitive.

Be aware that software files on the net may have a virus.

0 Comments
Please login to post your comment..
Crackaloud