FTP 登陆提示 530 Please login with USER and PASS

1.查看ftp端口21是否开放

firewall-cmd --permanent --query-port=21/tcp

2.开放21端口

[root@localhost ~]# firewall-cmd --permanent --add-port=21/tcp
success
[root@localhost ~]# firewall-cmd --reload

3.查看ftp状态
service vsftpd status

[root@localhost ~]# service vsftpd status
Redirecting to /bin/systemctl status vsftpd.service
● vsftpd.service - Vsftpd ftp daemon
   Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; disabled; vendor preset: disabled)
   Active: active (running) since 二 2020-06-30 14:28:09 CST; 20s ago
  Process: 1957 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=0/SUCCESS)
 Main PID: 1959 (vsftpd)
    Tasks: 1
   Memory: 752.0K
   CGroup: /system.slice/vsftpd.service
           └─1959 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf

6月 30 14:28:09 localhost.localdomain systemd[1]: Starting Vsftpd ftp daemon...
6月 30 14:28:09 localhost.localdomain systemd[1]: Started Vsftpd ftp daemon.

4.允许root用户通过ftp访问

vi /etc/vsftpd/ftpusers

注释掉root用户

#root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody
 vi /etc/vsftpd/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用户
#root
bin
daemon
adm
lp
sync
shutdown
halt
mail
"/etc/vsftpd/user_list" 20L, 362C written

5.重启ftp服务

[root@localhost ~]# service vsftpd restart
Redirecting to /bin/systemctl restart vsftpd.service
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容