從普通用戶切換到root用戶:
[xiaocai@localhost /]$ su
Password:
[root@localhost /]# cd
刪除之前的vsftpd:
yum remove vsftpd
安裝vsftpd
[root@izwz9ddpesgkw9afz1vbedz /]# yum -y install vsftpd
Loaded plugins: fastestmirror
base | 3.6 kB 00:00
epel | 4.2 kB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
epel/x86_64/updateinfo FAILED
http://mirrors.cloud.aliyuncs.com/epel/7/x86_64/repodata/7c69a981bdad61652d8490b811812c62c7254618e6f5e35284dc86c8a108c903-updateinfo.xml.bz2: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/
epel/x86_64/primary_db FAILED
http://mirrors.cloud.aliyuncs.com/epel/7/x86_64/repodata/bb3c5cf236d482017675c6363d454ed0692a34aea55c4cda7f7a9c9a5dc647f4-primary.sqlite.xz: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
(1/7): epel/x86_64/group_gz | 170 kB 00:00
(2/7): base/7/x86_64/group_gz | 155 kB 00:00
(3/7): extras/7/x86_64/primary_db | 168 kB 00:00
(4/7): base/7/x86_64/primary_db | 5.6 MB 00:01
(5/7): updates/7/x86_64/primary_db | 6.4 MB 00:02
Determining fastest mirrors
epel/x86_64/primary_db | 4.8 MB 00:01
Resolving Dependencies
--> Running transaction check
---> Package vsftpd.x86_64 0:3.0.2-21.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
vsftpd x86_64 3.0.2-21.el7 base 169 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 169 k
Installed size: 348 k
Downloading packages:
vsftpd-3.0.2-21.el7.x86_64.rpm | 169 kB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Installing : vsftpd-3.0.2-21.el7.x86_64 1/1
Verifying : vsftpd-3.0.2-21.el7.x86_64 1/1
Installed:
vsftpd.x86_64 0:3.0.2-21.el7
Complete!
[root@izwz9ddpesgkw9afz1vbedz /]# yum remove vsftpd
創(chuàng)建ftpfile文件夾:
[root@izwz9ddpesgkw9afz1vbedz /]# clear
[root@izwz9ddpesgkw9afz1vbedz /]# mkdir ftpfile
[root@izwz9ddpesgkw9afz1vbedz /]# cd ftpfile/
[root@izwz9ddpesgkw9afz1vbedz ftpfile]#
創(chuàng)建用戶 并更改權(quán)限
修改用戶密碼
[root@izwz9ddpesgkw9afz1vbedz ~]# passwd ftpuser
Changing password for user ftpuser.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@izwz9ddpesgkw9afz1vbedz ~]#
安全組策略,很多情況是安全組策略沒有打開而訪問不到
將8080端口映射為80端口:
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080