nginx the simplest process for installing vsftpd
- 2020-05-14 05:59:11
- OfStack
This article through other installation process after the summary of the simplest process, easy to need a quick installation configuration readers reference.
The simplest installation steps
[root@itdragon ~]# useradd ftpuser
[root@itdragon ~]# passwd ftpuser
Changing password for user ftpuser.
New password:
BAD PASSWORD: it is too short
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[root@itdragon ~]# yum -y install vsftpd
[root@itdragon ~]# ifconfig
Step 1: add ftp users
Step 2: set the ftp user password
Step 3: install vsftpd
Step 4: view the ip address
Step 5: use the free FileZilla linked virtual machine locally
Problems encountered
The connection fails
state : Waiting for a retry ...
state : Are connected 192.168.0.11:21...
error : 20 No activity after seconds, connection timeout
error : Could not connect to the server
Don't be discouraged. Installation is never a breeze, and everyone will have different problems depending on their environment. Here's my solution
First, make sure that both sides can pind, the virtual machine chooses the bridge mode, normal ping.
And then baidu
There are a lot of 5 flower 8 door solution on the net, basically be aimed at 3 respects
Here I will post a few web sites, because I did not successfully connect according to the practices on the website, finally closed the firewall to solve the problem. I'm weak on this one, so I don't want to confuse anyone. It is posted for easy modification later.
The first action is to turn off anonymity and turn on passive mode
The second operation is to open port 21 of the firewall
The third operation is to modify selinux to enable extranet access
[root@itdragon ~]# vim /etc/vsftpd/vsftpd.conf
anonymous_enable=NO
pasv_min_port=30000
pasv_max_port=31000
[root@itdragon ~]# service vsftpd restart
[root@itdragon ~]# vim /etc/sysconfig/iptables
-A INPUT -p tcp -m multiport --dport 20,21 -m state --state NEW -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
-A INPUT -p tcp --dport 30000:31000 -j ACCEPT
[root@itdragon ~]# service iptables restart
[root@itdragon ~]# getsebool -a | grep ftp
allow_ftpd_anon_write --> off
allow_ftpd_full_access --> off
allow_ftpd_use_cifs --> off
allow_ftpd_use_nfs --> off
ftp_home_dir --> off
ftpd_connect_db --> off
ftpd_use_fusefs --> off
ftpd_use_passive_mode --> off
httpd_enable_ftp_server --> off
tftp_anon_write --> off
tftp_use_cifs --> off
tftp_use_nfs --> off
[root@itdragon ~]# setsebool -P allow_ftpd_full_access on
[root@itdragon ~]# setsebool -P ftp_home_dir on
Temporary closure of the firewall is not enough, direct permanent closure of the firewall
[root@itdragon modprobe.d]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
[root@itdragon modprobe.d]# chkconfig iptables off
Upload failed
An images folder was created in the nginx installation directory. An error occurred when uploading images via FileZilla
The response :553 Could not create file.
error : Serious file transfer error
The solution is as follows
[root@itdragon html]# mkdir images
[root@itdragon html]# chmod -R 777 images
[root@itdragon html]# ll
total 12
-rw-r--r--. 1 root root 537 Nov 18 10:53 50x.html
drwxrwxrwx. 2 root root 4096 Nov 18 10:55 images
-rw-r--r--. 1 root root 612 Nov 18 10:53 index.html
[root@itdragon html]# vim /etc/vsftpd/vsftpd.conf
local_root=/var/ftp
[root@itdragon html]# service vsftpd restart
Pay attention to the point
The network must be able to access ping
The problem of firewall should be handled well
Unable to create file problem
The above is the most simple process of installing vsftpd for nginx. If you don't understand anything, please leave a comment below.