FTP stands for File Transfer Protocol, a standard Internet protocol, a "client-server" protocol used to transfer files between computers on the Internet over a "TCP/IP" connection; use FTP , the client can upload, download, delete, rename, move and copy files on the server.
#The operating environment of this article: Windows 7 system, Dell G3 computer.
What is FTP? This article will give you a brief introduction to FTP so that you can understand what ftp is? What is the use? There are two transfer modes of FTP, I hope it will be helpful to you.
What is FTP? What is the use?
FTP stands for File Transfer Protocol, a standard Internet protocol used to transfer files between computers on the Internet over a TCP/IP connection. Note: A protocol is a system of rules that networked computers use to communicate with each other.
FTP is a client-server protocol that relies on two communication channels between the client and the server: the command channel for controlling the conversation and the data channel for transferring file contents. The client initiates a conversation with the server by requesting to download files, i.e.: the client requests the files and the server provides them.
Using FTP, clients can upload, download, delete, rename, move and copy files on the server. Users usually need to log in to the FTP server, although some servers can make some or all of their content available without logging in, also known as anonymous FTP.
FTP transfer mode
We can start FTP in active or passive mode session. This mode determines how the connection is established. In both, the client creates a connection over TCP from a random port to the FTP server port 21.
In active mode, after the client requests to start a session through the command channel, the server initiates a data connection back to the client and starts transmitting data.
The client listens for incoming data connections from the server on port N, which can be any unprivileged port. To let the server know, it sends the FTP command "port N" to it. The server then establishes a connection with the client from its port 20 (FTP server data port) and starts transferring data.
In passive mode , the server uses the command channel to send the client the information needed to open a data channel.
The client will send the "PASV" command to the server and then receive the server IP address and port number from the server. The client uses this connection to initiate a data connection from the privileged port to start sending.
Because passive mode causes the client to initiate all connections, it is also called "firewall friendly" mode and works well across firewalls and Network Address Translation (NAT) gateways.
FTP Security
It is well known that FTP has security vulnerabilities . RFC 2228 was drafted to address these issues, but in May 1999, vulnerabilities were still identified for brute force attacks, FTP bouncing, packet capture, port theft, spoofing, and username enumeration.
We can use FTPS to circumvent these, which is more secure; we can also try better protocols, such as SSH file transfer protocol. If that still doesn't cut it, we can use Secure Shell, SSH or a Virtual Private Network, which are one of the best ways to protect your privacy online.
Summary: The above is the entire content of this article, I hope it will be helpful to everyone's study.
The above is the detailed content of What is FTP. For more information, please follow other related articles on the PHP Chinese website!