Home > Operation and Maintenance > Linux Operation and Maintenance > What should I do if I can't log in via ftp in Linux?

What should I do if I can't log in via ftp in Linux?

WBOY
Release: 2022-05-23 16:22:55
Original
5500 people have browsed it

Method: 1. Use "yum -y install vsftpd" to install vsftpd; 2. Use "chkconfig iptables off" to turn off the firewall; 3. Modify the vsftp file to allow the root user to log in; 4. Modify the disabled mode in the config and Just restart.

What should I do if I can't log in via ftp in Linux?

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

What to do if you cannot log in via ftp in 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 the root user to log in. This problem can be solved by modifying the restrictions

First find the configuration directory ofvsftp

[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
Copy after login

The above two are accounts that are not allowed to be used by vsftp by default List, delete the root in the file, or add a # sign in front to restart the vsftpd service

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

Recommended learning: Linux video tutorial

The above is the detailed content of What should I do if I can't log in via ftp in 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