Promo Offers Black Friday Offers:
OpenVS VPS up to 60% OFF for 12 months Learn More Semi-Dedicated up to 86% OFF for 3 months Learn More
  • Your Cart is Empty
  • Cart
  • Log In

FTP - File Transfer Protocol

What is the File Transfer Protocol (FTP)?

In the language of the Internet, FTP refers to a network protocol responsible for transferring files from one computer to another over a TCP computer network or the Internet, which explains the origin of its name, formed as an acronym of File Transfer Protocol.

FTP represents the network functionality that enables users to upload web page files (simple text files, images, multi-media files, etc.) from their personal computers to the server where their websites are located and vice versa - to download files from a particular server to their own machines.

What is the FTP commonly used for?

The most common use of FTP - for data transfer purposes, is of greatest help to users creating their websites on their personal computers due to the high flexibility levels it offers as far as the parameters of the computer-server connection are concerned. FTP comes in handy as soon as the websites' files are created (via a text editor or a specific webpage program) and are ready to be moved to the server where the websites will be hosted, so that their content could become accessible online. Through an FTP client, users can move their files to the server where their hosting account is located in seconds. Moreover, they can upload as many files at a time as necessary.

FTP- How does it work?

To take an advantage of FTP you must have an active Internet connection, a hosting server from/to where the files will be transferred and FTP account creation rights. All web hosting plans offered by NTC Hosting feature an integrated FTP Manager, allowing users to create several independent FTP accounts for their particular needs.

The FTP service is provided through a TCP network protocol. In order to establish an FTP connection the user needs to point his FTP client to an FTP server. The information needed includes an FTP host, FTP account credentials (username or password) and an FTP port.

The FTP host is the domain or subdomain address of the FTP server. It starts with ftp:// (e.g. ftp://my-best-domain.com). Also, the server’s IP may be used instead.

The FTP account credentials are the unique username and its corresponding password for a specific FTP account. The FTP account must be previously created on the FTP host server. Also, there is an option for the FTP server to allow connections with anonymous login details.

The FTP port is the network port on the server where the server's ftp service is listening for incoming connections. By default, the FTP port is set to 21, but it can be easily set to another port.

The FTP connection must be established in two different modes.

Active mode - When the FTP server is set to use connections in Active mode it waits for the user's FTP client to open a dynamic port. Then the client sends a PORT command containing the dynamic port number on which it is listening over the control stream and waits for a connection from the FTP server. When the FTP server initiates the data connection to the FTP client it binds the source port to port 20 on the FTP server.

An example of an FTP connection log using an Active mode

Status: Resolving address of my-best-domain.net

Status: Connection established, waiting for welcome message...

Response: 220 ProFTPD 1.2.10 Server (sc109.info) [66.40.34.171]

Command: USER demo

Response: 331 Password required for demomovie.

Command: PASS **********

Response: 230 User demo logged in.

Command: SYST

Response: 215 UNIX Type: L8

Command: FEAT

Response: 211-Features:

Response: 211-MDTM

Response: 211-REST STREAM

Response: 211-SIZE

Response: 211 End

Status: Connected

Status: Retrieving directory listing...

Command: PWD

Response: 257 "/" is current directory.

Command: TYPE I

Response: 200 Type set to I

Command: PASV

Response: 227 Entering Passive Mode (66,40,34,171,137,225).

Command: LIST

Response: 150 Opening ASCII mode data connection for file list

Response: 226 Transfer complete.

Status: Directory listing successful

Passive mode - Once the connection is opened in passive mode, the FTP server doesn't wait for the FTP client to send the data transfer port information. The server uses a PASV command and sends the FTP client the server's IP address to connect to and the port on which it is listening. In this case, the FTP client binds the source port of the connection to a dynamic port.

An example of an FTP connection log using a Passive mode

Status: Resolving address of my-best-domain.net

Status: Connecting to 66.40.34.171:21...

Status: Connection established, waiting for welcome message...

Response: 220 ProFTPD 1.2.10 Server (sc109.info) [66.40.34.171]

Command: USER demo

Response: 331 Password required for demomovie.

Command: PASS **********

Response: 230 User demo logged in.

Command: SYST

Response: 215 UNIX Type: L8

Command: FEAT

Response: 211-Features:

Response: 211-MDTM

Response: 211-REST STREAM

Response: 211-SIZE

Response: 211 End

Status: Connected

Status: Retrieving directory listing...

Command: PWD

Response: 257 "/" is current directory.

Command: TYPE I

Response: 200 Type set to I

Command: PASV

Response: 227 Entering Passive Mode (66,40,34,171,137,225).

Command: LIST

Response: 150 Opening ASCII mode data connection for file list

Response: 226 Transfer complete.

Status: Directory listing successful