阿里云ECS配置vsftpd,windows文件浏览器和IE浏览器不能访问

简介: 阿里云服务器ECS配置vsftpd(Centos7.4),浏览器或FileZilla能访问,但windows文件浏览器和IE浏览器不能访问

1、阿里云Centos7.4配置完vsftpd,windows文件浏览器和IE浏览器不能访问,但是浏览器或FileZilla能正常访问。

_

2、解决办法
在/etc/vsftpd/vsftpd.conf中添加被动模式的参数:


pasv_address=*.*.*.* #这里是你服务器的IPv4地址
pasv_enable=YES
pasv_min_port=9000
pasv_max_port=9099
#端口方位也可以自己定义,且要添加安全组

还需要对下面两个listen参数进行修改

listen=YES
listen_ipv6=NO

3、个人理解
ECS服务器有共有IP和私有IP,用ifconfig查看ip是显示的是私有IP。
当不设置pasv_address的时候PASV模式返回的地址是内网地址。

_

而且默认yum安装的ftp,listen_ipv6=YES,因此设置的IPV4地址将被忽略,所以还需要设置listen_ipv6=NO。

4、参考链接
(1)https://yq.aliyun.com/articles/80449#modal-login
_

(2)https://www.centos.org/forums/viewtopic.php?t=52408

5、完整的vsftpd.conf

    # 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_dir
    local_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_access
    #anon_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).
    connect_from_port_20=YES
    #
    # If you want, you can arrange for uploaded anonymous files to be owned by
    # a different user. Note! Using "root" for uploaded files is not
    # recommended!
    #chown_uploads=YES
    #chown_username=whoever
    #
    # You may override where the log file goes if you like. The default is shown
    # below.
    #xferlog_file=/var/log/xferlog
    #
    # If you want, you can have your log file in standard ftpd xferlog format.
    # Note that the default log file location is /var/log/xferlog in this case.
    xferlog_std_format=YES
    #
    # You may change the default value for timing out an idle session.
    #idle_session_timeout=600
    #
    # You may change the default value for timing out a data connection.
    #data_connection_timeout=120
    #
    # It is recommended that you define on your system a unique user which the
    # ftp server can use as a totally isolated and unprivileged user.
    #nopriv_user=ftpsecure
    #
    # Enable this and the server will recognise asynchronous ABOR requests. Not
    # recommended for security (the code is non-trivial). Not enabling it,
    # however, may confuse older FTP clients.
    #async_abor_enable=YES
    #
    # By default the server will pretend to allow ASCII mode but in fact ignore
    # the request. Turn on the below options to have the server actually do ASCII
    # mangling on files when in ASCII mode.
    # Beware that on some FTP servers, ASCII support allows a denial of service
    # attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
    # predicted this attack and has always been safe, reporting the size of the
    # raw file.
    # ASCII mangling is a horrible feature of the protocol.
    #ascii_upload_enable=YES
    #ascii_download_enable=YES
    #
    # You may fully customise the login banner string:
    #ftpd_banner=Welcome to blah FTP service.
    #
    # You may specify a file of disallowed anonymous e-mail addresses. Apparently
    # useful for combatting certain DoS attacks.
    #deny_email_enable=YES
    # (default follows)
    #banned_email_file=/etc/vsftpd/banned_emails
    #
    # You may specify an explicit list of local users to chroot() to their home
    # directory. If chroot_local_user is YES, then this list becomes a list of
    # users to NOT chroot().
    # (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
    # the user does not have write access to the top level directory within the
    # chroot)
    #chroot_local_user=YES
    #chroot_list_enable=YES
    # (default follows)
    #chroot_list_file=/etc/vsftpd/chroot_list
    #
    # You may activate the "-R" option to the builtin ls. This is disabled by
    # default to avoid remote users being able to cause excessive I/O on large
    # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
    # the presence of the "-R" option, so there is a strong case for enabling it.
    #ls_recurse_enable=YES
    #
    # When "listen" directive is enabled, vsftpd runs in standalone mode and
    # listens on IPv4 sockets. This directive cannot be used in conjunction
    # with the listen_ipv6 directive.
    listen=YES
    #
    # This directive enables listening on IPv6 sockets. By default, listening
    # on the IPv6 "any" address (::) will accept connections from both IPv6
    # and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6
    # sockets. If you want that (perhaps because you want to listen on specific
    # addresses) then you must run two copies of vsftpd with two configuration
    # files.
    # Make sure, that one of the listen options is commented !!
    listen_ipv6=NO
    
    pam_service_name=vsftpd
    userlist_enable=YES
    tcp_wrappers=YES
    
    
    pasv_address=*.*.*.*
    pasv_enable=YES
    pasv_min_port=9000
    pasv_max_port=9099
    
    dual_log_enable=YES
    vsftpd_log_file=/var/log/vsftpd.log
相关实践学习
快速体验PolarDB开源数据库
本实验环境已内置PostgreSQL数据库以及PolarDB开源数据库:PolarDB PostgreSQL版和PolarDB分布式版,支持一键拉起使用,方便各位开发者学习使用。
7天玩转云服务器
云服务器ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,可降低 IT 成本,提升运维效率。本课程手把手带你了解ECS、掌握基本操作、动手实操快照管理、镜像管理等。了解产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
23天前
|
人工智能 API 开发者
FastAPI开发者福音!FastAPI-MCP:将FastAPI秒变MCP服务器的开源神器,无需配置自动转换!
FastAPI-MCP是一款能将FastAPI应用端点自动转换为符合模型上下文协议(MCP)的开源工具,支持零配置自动发现接口并保留完整文档和模式定义。
491 71
FastAPI开发者福音!FastAPI-MCP:将FastAPI秒变MCP服务器的开源神器,无需配置自动转换!
|
15天前
|
存储 缓存 监控
阿里云服务器配置与云盘容量选择参考:实例规格、云盘等相关配置选择解析
对于初次接触云服务器的用户来说,面对众多配置选项和云盘容量选择,可能会不知道如何选择。有些用户甚至不清楚云服务器应该购买多大容量的云盘,也不知道哪一款配置的云服务器更适合自己的业务。本文将详细探讨这两个问题,并结合阿里云服务器的特点,为您提供一份云服务器配置与云盘容量选择指南,以供了解和选择参考。
|
7天前
|
弹性计算 缓存 安全
阿里云服务器4核16G配置整理:ECS实例规格、CPU型号及适用场景说明
阿里云ECS服务器4核16G配置提供了多种实例规格选择,如高主频通用型hfg8i(Intel第四代Xeon处理器,全核睿频3.9GHz)、经济型e、通用型g8i/g7等,满足不同业务需求。其中,hfg8i为官方推荐,适合高性能计算;经济型e在活动中更具性价比。各规格覆盖游戏服务器、数据库系统、数据分析、AI训练等多种场景,用户可根据实际需求选择合适的CPU型号与使用场景。更多详情可参考阿里云官方文档。
61 2
|
28天前
|
Ubuntu 安全 网络安全
在Ubuntu系统下使用vsftpd配置FTP服务器的步骤
以上就是在Ubuntu系统下使用vsftpd配置FTP服务器的步骤。这些步骤都是基础的,但足够让你建立一个简单的FTP服务器。如果你需要更高级的功能,例如SSL加密、虚拟用户等,你可能需要进一步研究vsftpd的配置选项。
87 13
|
1月前
|
存储 监控 API
【Azure App Service】分享使用Python Code获取App Service的服务器日志记录管理配置信息
本文介绍了如何通过Python代码获取App Service中“Web服务器日志记录”的配置状态。借助`azure-mgmt-web` SDK,可通过初始化`WebSiteManagementClient`对象、调用`get_configuration`方法来查看`http_logging_enabled`的值,从而判断日志记录是否启用及存储方式(关闭、存储或文件系统)。示例代码详细展示了实现步骤,并附有执行结果与官方文档参考链接,帮助开发者快速定位和解决问题。
85 23
|
1月前
|
存储 弹性计算 数据处理
阿里云服务器2核8G、4核16G、8核32G配置热门实例价格、性能与场景全攻略
2核8G/4核16G/8核32G配置的阿里云服务器在阿里云活动中目前有经济型e、通用算力型u1、通用型c7、通用型g8i和通用型g8y五种实例可选,虽然配置相同,但是这些实例规格之间的价格差别是很大的。面对不同配置和类型的云服务器实例,有的新手用户往往因为不知道他们之间的区别,所以不知道如何选择。本文将针对常见的2核8G、4核16G、8核32G配置,深入剖析阿里云服务器中的经济型e、通用算力型u1、通用型g7及通用型g8y实例,以供大家参考和选择。
|
1月前
|
Ubuntu 网络协议
在Ubuntu 18.04服务器上配置双网口以接入互联网
总结一下,配置双网口在Ubuntu 18.04服务器就像一场冒险游戏,你小心翼翼地从查看网络布局开始,铺设新线路,最后得到了通往互联网的双重通道。祝你在网络世界的冒险旅程中更上一层楼!
63 11
|
1月前
|
存储 弹性计算 固态存储
阿里云服务器配置怎么选择?根据用户类型及使用场景配置推荐
如何选择阿里云服务器配置?2025年全解析!个人用户可选68元/年的轻量应用服务器(2核2G、200M带宽),企业用户推荐199元/年的ECS通用算力型u1实例(2核4G、5M带宽)。针对不同需求,还有内存型、计算型、高主频型及GPU服务器等多规格实例。带宽选择需根据访问量,小流量应用3M即可,高流量建议10M起步。存储方面,系统盘40GB够用,数据盘按需选择ESSD或SSD云盘,确保I/O性能满足业务需求。阿小云为你整理最新攻略,助你高效选型!
|
1月前
|
存储 弹性计算 人工智能
阿里云服务器2核8G/4核16G/8核32G配置热门实例规格对比与选购指南
如果我们是计划购买2核8G/4核16G/8核32G配置的阿里云服务器,在阿里云活动中一般会有经济型e、通用算力型u1、通用型g7、通用型g8i和通用型g8y几种常见的实例规格可选,尽管这些实例在配置上相似,但它们在性能、价格以及适用场景上存在显著差异。本文将深入解析这些实例规格的性能特点、价格差异及适用场景,为用户在阿里云服务器购买时提供详实的参考依据。
|
1月前
|
弹性计算 固态存储 ice
阿里云服务器ECS内存型2核16G、4核32G和8核64G配置实例、费用和性能参数表
本文整理了2025年阿里云服务器租赁价格表,涵盖2核16G、4核32G和8核64G配置收费标准。CPU内存比为1:8,提供多种实例规格如ECS内存型r8i、通用算力型u1等。价格由CPU内存、公网带宽及系统盘组成,支持优惠折扣(年付6.7折起)。文中详细列出各配置参考价格、公网带宽与系统盘收费,并对比不同实例规格性能,如Intel Xeon和AMD EPYC处理器系列,帮助用户选择高性价比方案。具体价格以阿里云官网为准。
127 4

热门文章

最新文章