FTP Server (FTP Server)

File Transfer Protocol (FTP) is a standard protocol used for transferring files over a network. It belongs to the application layer of network transmission protocols.

FTP is an 8-bit client-server protocol that can operate on any type of file without requiring further processing, similar to MIME or Unicode. However, FTP has extremely high latency, which means the time from the initial request to the first receipt of the requested data can be very long, and there are often lengthy login procedures that must be executed.

Overview

FTP services generally operate on ports 20 and 21. Port 21 is used for data flow transmission between the client and server, while port 20 is used for control flow transmission and is the command input to the FTP server. When data is transmitted via the data flow, the control flow is idle. When the control flow is idle for a long time, the client's firewall may timeout its session, which can lead to issues when a large amount of data is being transmitted through the firewall. In this case, while the file may be successfully transmitted, the control session may be terminated by the firewall, resulting in transmission errors.

Although FTP can be used directly by end users, it is designed to be controlled by FTP client programs.

Many sites that run FTP services offer anonymous services, allowing users to log in to the server without an account. By default, the username for anonymous users is "anonymous." This account does not require a password, although it typically asks for the user's email address as an authentication password, but this is just a detail, and the email address may not be validated at all, relying instead on the configuration of the FTP server.

Objectives of FTP Implementation

  • Facilitate file sharing (computer programs or data)
  • Encourage indirect or implicit use of remote computers
  • Hide the details of various file storage systems on different hosts from users
  • Reliable and efficient data transmission

Disadvantages

  • Passwords and file contents are transmitted in plaintext, which may lead to unwanted eavesdropping.
  • Because a random port must be opened to establish a connection, it can be difficult for clients to filter FTP traffic in active mode when a firewall is present. This problem is largely resolved by using passive mode FTP.
  • The server may be told to connect to a third-party computer's reserved port.
  • This method performs poorly when a large number of small files need to be transferred.

Active and Passive Modes

FTP has two operational modes: active and passive. Active mode requires both the client and server to open and listen on a port to establish a connection. In this scenario, the client may encounter some issues due to the firewall. Therefore, passive mode was created. Passive mode only requires the server to create a process that listens on the corresponding port, which circumvents issues caused by firewalls on the client side.

The steps to establish an FTP connection in active mode are as follows:

  • The client opens a random port (port number greater than 1024, referred to as x) while an FTP process connects to the server's port 21 for commands. At this point, the source port of the TCP connection is the client's designated random port x, and the destination port (remote port) is port 21 on the server.
  • The client begins listening on port (x+1) and sends a port command to the server (through port 21), indicating to the server the port number the client is listening on and that it is ready to receive data from that port. This port is known as the data port.
  • The server opens source port 20 and establishes a connection with the client's data port. At this point, the source port is 20, and the remote data (destination) port is (x+1).
  • The client establishes a connection to the server's port 20 through its original data port and sends a response to the server, indicating that it has established a connection.

FTP and Web Browsers

Most modern web browsers and file managers can connect to FTP servers. This allows remote files to be manipulated through an interface just like local files. This functionality is implemented by providing an FTP URL in the form of ftp:// (for example, ftp://ftp.gimp.org). Providing a password is optional; if present, it takes the form ftp://:@. Most web browsers require the use of passive FTP mode; however, not all FTP servers support passive mode.


How to Choose a Touchscreen?

Answers & Suggestions

How to Choose an Interactive Whiteboard?

Answers & Suggestions

Benefits of Recording Classes

Answers & Suggestions

知識學院

蘊藏許多助人的知識與智慧。

關注知識學院

By clicking "Accept All", you agree to our use of cookies to enhance your website experience, analyze performance, and deliver relevant marketing content. For more details, see our Privacy Policy. You can also manage your cookie preferences.

×

Privacy Policy

Welcome to our website. To help you use our services with confidence, we explain our privacy policy below to safeguard your rights. Please read the following information carefully:

  • Scope of the Privacy Policy: This privacy policy applies to all personal data collected by this website, including how we collect, process, and use such data when you use our services. This policy does not apply to other linked websites or personnel not managed by this website.
  • Collection, Processing, and Use of Personal Data: When you visit our website or use our services, we may ask for necessary personal information, which will be processed and used only for specified purposes. Without your written consent, we will not use your personal data for other purposes.
  • Data Protection: We adopt multiple security measures to protect your personal data, including firewalls and antivirus systems. Only authorized personnel can access your data, and they must sign confidentiality agreements. When we outsource services, we require that they comply with confidentiality obligations and ensure data security.
  • External Links: Our web pages may contain links to external websites. These linked websites do not fall under our privacy policy, and you should refer to their respective privacy policies.
  • Sharing Personal Data with Third Parties: We do not provide, exchange, rent, or sell your personal data to third parties, except as required by law or contractual obligations. We may share your data under the following circumstances:
    • With your written consent.
    • As required by law.
    • To protect your life, body, freedom, or property from danger.
    • For statistical or academic research with public institutions or academic research organizations, ensuring data is anonymized.
    • When your actions on the website violate the terms of service, necessitating identification, contact, or legal action.
  • Use of Cookies: To provide you with the best service experience, we use cookies on your device. If you do not wish to accept cookies, you can increase the privacy level in your browser settings to refuse cookies. This may, however, affect the availability of certain features.
  • Privacy Policy Revisions: We may revise the privacy policy as needed, and any changes will be published on this website to ensure you are informed of how we handle your personal data.