Deep analysis FTP

Created: Sep 20, 2018 17:21:17Latest reply: Sep 26, 2018 14:57:42 139 3 0 0
FTP (File Transfer Protocol)

The full name of FTP is File Transfer Protocol. Bidirectional transmission of control files over the Internet. It is also an Application. There are different FTP applications based on different operating systems, and all of these applications follow the same protocol to transfer files. In the use of FTP, users often encounter two concepts: "Download" and "Upload". To download a file is to copy it from a remote host to your computer. Uploading files is copying files from your computer to a remote host. In Internet language, users can upload (download) files to (from) a remote host through a client program. In the TCP/IP protocol, the FTP standard command TCP Port number is 21, the Port mode data Port is 20, and the task of FTP is to transfer files from one computer to another without restriction from the operating system.
There are two ways to transfer FTP: ASCII and binary.
1.ASCII transmission
Assuming that the file the user is copying contains simple ASCII text, if it is not UNIX running on a remote machine, FTP will usually automatically adjust the contents of the file as the file is transferred so that the file can be interpreted as the text file format stored on the other computer.But often, the files the user is transferring don't contain text files, they could be programs, databases, word processing files or compressed files. Use the binary command to tell FTP to copy verbatim before copying any non-text file.
2. Binary transmission mode
In binary transfers, save the bit order of the file so that the original and copied are bit by bit. Even a file on the destination machine that contains a bit sequence is meaningless. For example, a Macintosh sends an executable file to a Windows system in binary, which cannot be executed on the other system.If the binary is transmitted in ASCII mode, it will be translated even if it is not needed. This will corrupt the data. (the ASCII approach generally assumes that the first valid bit of each character is meaningless, because the ASCII character combination does not use it. All bits are important if you are transferring binary files.

FTP supports two modes: Standard (PORT mode, active mode) and Passive (PASV, Passive mode).
1. The model of the Port
The FTP client first establishes a connection with the server's TCP 21 PORT to send the command, and the client sends the PORT command on this channel when it needs to receive data. The PORT command contains what PORT the client USES to receive data. When transmitting data, the server sends data through its own TCP 20 port to the client's designated port. The FTP server must establish a new connection with the client to transfer data.
2. The Passive mode
1.Establishing control channels is similar to Standard mode, but sending Pasv commands after establishing a connection. After receiving the Pasv command, the server opens a temporary port (the port number is greater than 1023 and less than 65535) and informs the client of the request to transfer data on this port. The client connects to the FTP server on this port, and the FTP server will then transfer data through this port.2.Many firewalls are not allowed to accept external initiated connections at the time of setting up, so many FTP servers behind the firewall or on the internal network do not support PASV mode, because the client cannot open the high-end port of the FTP server through the firewall. Many Intranet clients cannot access the FTP server in PORT mode because TCP 20 from the server cannot establish a new connection to the internal network client, which makes it unable to work.


If this information is useful to you , I will post SFTP and FTPS next week  thanks.
This post was last edited by liwaye at 2018-09-20 17:23.
  • x
  • convention:

Mysterious.color  Visitor   Created Sep 20, 2018 17:55:58 Helpful(0) Helpful(0)

Thanks for information
:)
  • x
  • convention:

find what you love and let it kill you.
faysalji  Visitor   Created Sep 21, 2018 01:17:25 Helpful(0) Helpful(0)

Thanks
  • x
  • convention:

If you think my post/reply is useful, please click the Helpful button and flag my post as a BEST ANSWER. Thanks
liwaye     Created Sep 26, 2018 14:57:42 Helpful(0) Helpful(0)

THANK YOU FOR SUPPORT !
  • x
  • convention:

Reply

Reply
You need to log in to reply to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Fast reply Scroll to top