ftp连接21端口出现的问题的解决方案
来源:互联网 发布:java接收上传图片表单 编辑:程序博客网 时间:2024/05/20 18:40
ftp 22端口可以连接但是21端口连接不上
是因为 /etc/vsftpd/nginx.config出现了问题
[root@imageServe myfile]# cd /etc/vsftpd[root@imageServe myfile]# cd /etc/vsftpd[root@imageServe vsftpd]# lsftpusers user_list vsftpd.conf vsftpd_conf_migrate.sh[root@imageServe vsftpd]# vi vsftpdvsftpd.conf vsftpd_conf_migrate.sh [root@imageServe vsftpd]# vi vsftpdvsftpd.conf vsftpd_conf_migrate.sh [root@imageServe vsftpd]# vi vsftpd.conf[root@imageServe vsftpd]# service vsftpd restartRedirecting to /bin/systemctl restart vsftpd.service[root@imageServe vsftpd]# lsftpusers user_list vsftpd.conf vsftpd_conf_migrate.sh[root@imageServe vsftpd]# vi ftpusers[root@imageServe vsftpd]# vi user_list[root@imageServe vsftpd]# service vsftpd restartRedirecting to /bin/systemctl restart vsftpd.service[root@imageServe vsftpd]#
vsftpd.config的正确配置
# Example config file /etc/vsftpd/vsftpd.conf## The default compiled in settings are fairly paranoid. This sample file# loosens things up a bit, to make the ftp daemon more usable.# Please see vsftpd.conf.5 for all compiled in defaults.## READ THIS: This example file is NOT an exhaustive list of vsftpd options.# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's# capabilities.## Allow anonymous FTP? (Beware - allowed by default if you comment this out).anonymous_enable=YES## Uncomment this to allow local users to log in.# When SELinux is enforcing check for SE bool ftp_home_dirlocal_enable=YES## Uncomment this to enable any form of FTP write command.write_enable=YES## Default umask for local users is 077. You may wish to change this to 022,# if your users expect that (022 is used by most other ftpd's)local_umask=022## Uncomment this to allow the anonymous FTP user to upload files. This only# has an effect if the above global write enable is activated. Also, you will# obviously need to create a directory writable by the FTP user.# When SELinux is enforcing check for SE bool allow_ftpd_anon_write, allow_ftpd_full_accessanon_upload_enable=YES## Uncomment this if you want the anonymous FTP user to be able to create# new directories.anon_mkdir_write_enable=YES## Activate directory messages - messages given to remote users when they# go into a certain directory.dirmessage_enable=YES## Activate logging of uploads/downloads.xferlog_enable=YES## Make sure PORT transfer connections originate from port 20 (ftp-data)."vsftpd.conf" 131L, 5097C
然后在重新启动一下ftp
service vsftpd restart
然后再连接试试,如果还不行查看root是否被禁止了
输入vi ftpusers
# Users that are not allowed to login via ftp#root // 这个地方root前要有#bindaemonadmlpsyncshutdownhaltmailnewsuucpoperatorgamesnobody
再查看vi 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前要有#bindaemonadmlpsyncshutdownhaltmailnewsuucpoperatorgamesnobody
然后再重新连接21端口试试
阅读全文
0 0
- ftp连接21端口出现的问题的解决方案
- Linux~连接windows的ftp,unzip出现的问题
- Linux~连接windows的ftp,unzip出现的问题
- Linux~连接windows的ftp,unzip出现的问题
- Linux~连接windows的ftp,unzip出现的问题
- Linux~连接windows的ftp,unzip出现的问题
- Linux~连接windows的ftp,unzip出现的问题
- FileZilla无法连接ftp服务器的解决方案
- FileZilla无法连接ftp服务器的解决方案
- MySQL 连接数据库出现问题时的解决方案。
- pyodbc连接SQL Server出现中文乱码问题的解决方案
- 连接、查询出现的问题及解决方案(…
- falcon出现了 自己用1988端口连接自己1988端口的问题
- 关于ftp和ssh修改端口之后,连接不上的问题
- [解决方案] 关于云服务器FTP搭建的一些小问题(PASV连接超时)
- FTP的默认端口
- SHELL实现FTP自动连接非默认端口的主机
- 出现NaN问题的解决方案
- java多线程知识图谱
- 什么是网络编程之网络编程详解
- 转圈游戏 解题报告
- markdown编辑器基本用法
- Android Studio 自动生成 Gson bean(json解析快捷方法)
- ftp连接21端口出现的问题的解决方案
- HDOJ 2094 产生冠军
- 求割顶、桥
- Leetcode算法学习日志-621 Task Scheduler
- 增加运算符重载功能:+
- Linux环境下启动监听,启动/关闭Oracle
- String StringBuffer StringBuilder
- 回答阿里社招面试如何准备,顺便谈谈对于Java程序猿学习当中各个阶段的建议
- 关于方法的重载和重写的区别