Introduction to FTP file transfer protocol and common commands

      Students who learn cloud computing will definitely encounter when using FTP tools. Today, Xiaoqian will briefly introduce to you what FTP is and some common FTP commands.

      Ftp introduction

      File Transfer Protocol (FTP), based on which FTP client and server can share files, upload files, and download files. FTP generates a virtual connection based on the TCP protocol, which is mainly used to control FTP connection information, and at the same time generates a separate TCP connection for FTP data transmission. Users can upload, download, and delete files to the FTP server through the client, and the FTP server can be shared by multiple people at the same time.

      The FTP service is the Client/Server (C/S) mode. The software that realizes the external sharing and transmission of FTP files based on the FTP protocol is called the FTP server source side. The client program is based on the FTP protocol, so it is called the FTP client. FTP The client can upload and download files to the FTP server.

      FTP Server

      Function: Provide file sharing service, realize upload and download

      port:

      21st, the default port for establishing tcp connection

      No. 20: Transfer data

      1. FTP basics

1

      ftp active mode

      FTP active mode: The client opens a port N (>1023) to port 21 of the server, establishes a connection, and opens an N+1 at the same time, telling the server that I am listening on port N+1. After the server receives the request, Use your own 20 port to connect to the client's N+1 port for transmission

      21 port to establish connection

      20 ports for data transmission

      ftp passive mode

      ftp passive mode: the client opens two ports (1024, 1025) at the same time, one port (1024) establishes a connection with port 21 of the server, and requests, brother, I connected, you open another port. After the server receives the request, it randomly opens a port (1027) and tells the client that I am opening port 1027. The client uses another port (1025) to connect with the server's (1027) port to transmit data

      Introduction to Vsftp server

      Very secure FTP service process (Very Secure FTP daemon, Vsftpd), Vsftpd is the most mainstream FTP server program in Unix/Linux distributions. The advantages are small and light, safe and easy to use, stable and efficient, and can meet the needs of enterprises across departments and multiple users. (1000 users) and so on.

      Two, vsftpd configuration

2

      Important: If you change the owner of the root directory, you can only access it, and other permissions cannot take effect. Because we are accessing as an ftp user, and the default owner and group of pub is root.

      note:

      -After modifying the configuration, you need to restart the service to take effect

      -You also need to log in from the client again, otherwise the modified configuration will not be effective.

      Edit configuration file

      [root@ftp-server ~]# vi /etc/vsftpd/vsftpd.conf ---- find line 29 and cancel the comment below

      34 anon_other_write_enable=YES

3

4


This article is from Qianfeng Education , please indicate the source for reprinting

Guess you like

Origin blog.51cto.com/15128693/2675811