Solution to ftp failure to connect and log in to linux

王林
Release: 2019-11-14 11:19:35
Original
4273 people have browsed it

Solution to ftp failure to connect and log in to linux

1. First install vsftpd

Command:

yum -y install vsftpd
Copy after login

then start the service:

service vsftpd start
Copy after login

2. Turn off the firewall

1) It will take effect after restarting

Open:

chkconfig iptables on
Copy after login

Close:

chkconfig iptables off
Copy after login

2) Effective immediately, invalid after restart

Open:

service iptables start
Copy after login

Close:

service iptables stop
Copy after login

3. By default, vsftp does not allow root users to log in. You can Solve this problem by modifying the restrictions

首先找到vsftp的配置目录
[root@localhost vsftpd]# pwd
/etc/vsftpd
[root@localhost vsftpd]# ls
chroot_list  ftpusers  user_list  vsftpd.conf  vsftpd_conf_migrate.sh
[root@localhost vsftpd]#

修改
[root@localhost vsftpd]# cat ftpusers
# Users that are not allowed to login via ftp
#root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody

修改
[root@localhost vsftpd]# cat user_list
# vsftpd userlist
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers
# for users that are denied.
#root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody

上面这个两个就是默认情况下vsftp不允许使用的账号列表,讲文件中root删除,或者前面加个#号 重启一下vsftpd 服务 即可
Copy after login

4. Change the enforcing mode in /etc/selinux/config to disabled, then restart

Recommended tutorial:Linux tutorial

The above is the detailed content of Solution to ftp failure to connect and log in to linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!