当前位置:网站首页>FTP service
FTP service
2022-07-22 00:27:00 【Fair and bright Swiss Roll】
One 、FTP(File Transfer potocol) File transfer association
FTP Is a typical C/S Application layer protocol of architecture , The server software is required 、 The two parts of the client software jointly realize the file transfer function .FTP The connection between the client and the server is reliable , Connection oriented , It provides reliable guarantee for data transmission .tcp Agreement for 20,21 port .
21 port : Used to establish a connection , Transmit instructions
20 port : For data transfer
FTP It's a file transfer protocol , It supports two modes , One way is called Standard( That is to say Active, Active way ), One is Passive( That is to say PASV Passive way ):
Standard Pattern ( Active mode )
FTP The client first communicates with FTP Server Of TCP
21 Port establish connection , Send commands through this channel , When the client needs to receive data, it will send it on this channel PORT command .PORT The command contains what port the client uses to receive data . When transmitting data , Server side through their own TCP 20 Port send data . FTP server A new connection must be established with the client to transmit data .
Passive Pattern ( Passive mode )
When establishing control channels and standard Similar model , When the client sends through this channel PASV When ordered ,FTPserver Open a window located in 1024 and 5000 And notify the client of the request to transmit data on this port , then FTP server Data will be transmitted through this port , This is the time FTP server There is no longer a need to establish a new connection with the client
Two 、 stay centos7 On the configuration ftp service
1、 install ftp
yum install -y vsftpd
2、 Turn off firewall
systemctl stop firewalld
setenforce 0
3、 Set up service startup
systemctl enable vsftpd
# Boot up
systemctl start vsftpd
# Turn on vsftpd
systemctl status vsftpd
# see vsftpd The state of
4、 modify ftp The configuration file ( Anonymous user access )
vim /etc/vsftpd/vsftpd.conf
5、ftp Folder location of the service
/var/ftp/pub/
3、 ... and 、 Test anonymous user login ftp
stay /var/ftp/pub/ Next create a txt text file
stay windows On this PC , Input ftp The address of the server ( Deploy ftp Of the server ip)
The format is as follows
success
Four 、 Account password login ftp
Get into /etc/vsftpd/vsftpd.conf Set the configuration file
12 anonymous_enable=NO
# Turn off anonymity
23 local_umask=033
# Set to divide root No permission to use outdoors
33 #anon_mkdir_write_enable=YES
34 #anon_other_write_enable=YES
# Comment out anonymous user settings
125 listen_ipv6=YES
126 local_root=/data/B/ftp # Specify the directory to which the user logs in , This directory is the root directory where the login user logs in
127 pam_service_name=vsftpd
128 userlist_enable=YES
129 tcp_wrappers=YES
130 allow_writeable_chroot=YES
Get into /etc/vsftpd/chroot_list Add the user name with restricted login
vim /etc/vsftpd/chroot_list
paul
test , Using the user paul To log in, you need to enter a password
边栏推荐
猜你喜欢
Oracle中Drop Table之后想恢复?来看这里[只要二步]
Analysis of JVM operation principle
解决:2003-Cant connect to MySQL server on **** 以及use near ‘IDENTIFIED BY ‘*****‘ WITH GRANT OPTION‘ at
FTP服务
DNS域名解析
Synchronization and mutual exclusion of processes
2022 latest Ningxia construction eight members (Electrical constructors) simulation question bank and answers
DataX环境部署以及测试案例
ENSP configure DHCP
Part 04: guava retry component
随机推荐
假币问题
BGP基本配置和路由聚合
Stata used in jupyter
XFS file system and ext series repair methods
Do you want to restore the drop table in oracle? Look here [just two steps]
Intranet detection 2-powershell collects domain information & sensitive data / data / information collection and sorting
vim编辑器
Pour ajouter une dépendance à Idea:
路由器的工作原理
Byte practice precipitation
部署LVS-NAT集群
2.Ansible中常用模块
Host information collection script
2. Modules communs dans ansible
solr部署以及ik中文分词案例
92. 递归实现指数型枚举
User account and group account overview
Centos7 deploy mysql8
kettle入门之文本文件导入数据库
Four stages of writing C language