Tech Blog Tips

Get Help & Tips About Technology

What is File Transfer Protocol (FTP)?

FTP or File Transfer Protocol is an internet protocol used to transfer files across the internet from one computer to another. For example, when you are installing a software like WordPress on your website, then you will most likely use FTP in order to upload all of the WordPress files from your personal computer to your server. In order to do this, you need something called an FTP client. The FTP client is software that runs on your personal computer and allows you to transfer files to and from your web server. Filezilla and WS_FTP are examples of easy to use FTP clients.

FTP is a client-server protocol that relies on two communications channels between client and server: a command channel for controlling the conversation and a data channel for transmitting file content. Clients initiate conversations with servers by requesting to download a file. Using FTP, a client can upload, download, delete, rename, move and copy files on a server. A user typically needs to log on to the FTP server, although some servers make some or all of their content available without login, also known as anonymous FTP.

FTP sessions work in passive or active modes. In active mode, after a client initiates a session via a command channel request, the server initiates a data connection back to the client and begins transferring data. In passive mode, the server instead uses the command channel to send the client the information it needs to open a data channel. Because passive mode has the client initiating all connections, it works well across firewalls and Network Address Translation (NAT) gateways.

FTP Connection Modes (Active vs. Passive)

FTP may operate in an active or a passive mode, which determines how a data connection is established. In both cases, a client creates a TCP control connection to an FTP server command port 21. This is a standard outgoing connection, as with any other file transfer protocol (SFTP, SCP, WebDAV) or any other TCP client application (e.g. web browser). So, usually, there are no problems when opening the control connection.
Where FTP protocol is more complicated compared to the other file transfer protocols are file transfers. While the other protocols use the same connection for both session control and file (data) transfers, the FTP protocol uses a separate connection for the file transfers and directory listings.
In the active mode, the client starts listening on a random port for incoming data connections from the server (the client sends the FTP to command PORT to inform the server on which port it is listening). Nowadays, it is typical that the client is behind a firewall (e.g. built-in Windows firewall) or NAT router (e.g. ADSL modem), unable to accept incoming TCP connections.
For this reason, the passive mode was introduced and is mostly used nowadays. It is a default for WinSCP too. Using the passive mode is preferable because most of the complex configuration is done only once on the server side, by the experienced administrator, rather than individually on a client side, by (possibly) inexperienced users.
In the passive mode, the client uses the control connection to send a PASV command to the server and then receives a server IP address and server port number from the server, which the client then uses to open a data connection to the server IP address and server port number received.

Thanks for reading this article hope it helps you. for more articles like this follow our blog regularly.

More Articles


Add a Comment
  1. Amar video download poblem hoche thik korte chai please ektu help koron

    1. Please if not work try again.

  2. Nice i like song

    1. Thanks for your valuable feedback.

  3. an downloader

  4. Videos download kesy hoty han

  5. File transfer protocol is used to send files over the network

Leave a Reply

Your email address will not be published. Required fields are marked *

Tech Blog Tips © 2018