centos7~ Solve errors such as 530, 500, 421 and other errors when logging in via FTP

Problem Description

1. The user has been added but cannot log in inexplicably. The user is really in trouble. How can he survive this? I did it, and the problem occurred as shown below:

 

cat /etc/passwd to see if it is a previously added user and determine if it exists.

If the creation is not successful, use useradd -s /sbin/nologin zhangsan and other users
, and then set the password to passwd zhangsan 
. When zhangsan sees the prompt as shown below, you can directly ignore it and re-enter the password  .
Reference article: Linux password change error: Password failed Dictionary checking - too simplistic/systematic

Question one: 

530 Login incorrect.
Login failed.

An error occurs when ftp logs in, 530 Login incorrect.Login failed.
cat /etc/passwd, check the home directory of the account you logged in and the login shell. Mine is /sbin/nologin
username:password:user identification number:group Identification number: Annotated description: Home directory: Login Shell
Check cat /etc/shells to see if there is your user's home directory and login shell. There is no addition, saving, or exit.

Question two: 

500 OOPS: vsftpd: refusing to run with writable root inside chroot()
Login failed.
421 Service not available, remote server has closed connection

Since 2.3.5, vsftpd has enhanced security checks. If a user is restricted to his home directory, the user's home directory no longer has write permissions! If the check finds that there is still write permission, this error will be reported.

 To fix this error, you can use the command chmod  aw /home/user to remove the write permission of the user's home directory. Be careful to replace the directory with your own. Or you can add one of the following two items to the vsftpd configuration file:

allow_writeable_chroot=YES

vim /etc/vsftpd/vsftpd.conf 

"----------------------The successful results are as follows:---------------------- ------》

 

"---------------------If you don't succeed after reading this article, please don't come to see me---------- ---------------》

Guess you like

Origin blog.csdn.net/weixin_44657888/article/details/131289855