Amazon ec2 AWS云与Virtualmin ftp错误:检索目录列表失败

Amazon ec2 AWS云与Virtualmin ftp错误:检索目录列表失败,amazon-ec2,proftpd,Amazon Ec2,Proftpd,在AWS云中的Ubuntu实例上使用Virtualmin,我创建了一个虚拟服务器,但FTP不起作用。它已连接,但出现以下错误: Command: MLSD Error: Connection timed out Error: Failed to retrieve directory listing 我已经在Amazon security上打开了端口20和21 这是我的完整proftpd.conf: # # /etc/proftpd/proftpd.conf -- This is a

在AWS云中的Ubuntu实例上使用Virtualmin,我创建了一个虚拟服务器,但FTP不起作用。它已连接,但出现以下错误:

Command:    MLSD
Error:  Connection timed out
Error:  Failed to retrieve directory listing
我已经在Amazon security上打开了端口20和21

这是我的完整
proftpd.conf

#
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
# To really apply changes, reload proftpd after modifications, if
# it runs in daemon mode. It is not required in inetd/xinetd mode.
# 

# Includes DSO modules
Include /etc/proftpd/modules.conf

# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
UseIPv6             on
# If set on you can experience a longer connection delay in many cases.


  IdentLookups          off

ServerName          "Debian"
ServerType          standalone
DeferWelcome            off

MultilineRFC2228        on
DefaultServer           on
ShowSymlinks            on

TimeoutNoTransfer       600
TimeoutStalled          600
TimeoutIdle         1200

DisplayLogin                    welcome.msg
DisplayChdir                .message true
ListOptions                 "-l"

DenyFilter          \*.*/

# Use this to jail all users in their homes 
# DefaultRoot           ~

# Users require a valid shell listed in /etc/shells to login.
# Use this directive to release that constrain.
# RequireValidShell     off

# Port 21 is the standard FTP port.
Port                21

# In some cases you have to specify passive ports range to by-pass
# firewall limitations. Ephemeral ports can be used for that, but
# feel free to use a more narrow range.
# PassivePorts                  49152 65534

# If your host was NATted, this option is useful in order to
# allow passive tranfers to work. You have to use your public
# address and opening the passive ports used on your firewall as well.
# MasqueradeAddress     1.2.3.4

# This is useful for masquerading address with dynamic IPs:
# refresh any configured MasqueradeAddress directives every 8 hours
<IfModule mod_dynmasq.c>
# DynMasqRefresh 28800
</IfModule>

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances            30

# Set the user and group that the server normally runs at.
User                proftpd
Group               nogroup

# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask               022  022
# Normally, we want files to be overwriteable.
AllowOverwrite          on

# Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:
# PersistentPasswd      off

# This is required to use both PAM-based authentication and local passwords
# AuthOrder         mod_auth_pam.c* mod_auth_unix.c

# Be warned: use of this directive impacts CPU average load!
# Uncomment this if you like to see progress and transfer rate with ftpwho
# in downloads. That is not needed for uploads rates.
#
# UseSendFile           off

TransferLog /var/log/proftpd/xferlog
SystemLog   /var/log/proftpd/proftpd.log

# Logging onto /var/log/lastlog is enabled but set to off by default
#UseLastlog on

# In order to keep log file dates consistent after chroot, use timezone info
# from /etc/localtime.  If this is not set, and proftpd is configured to
# chroot (e.g. DefaultRoot or <Anonymous>), it will use the non-daylight
# savings timezone regardless of whether DST is in effect.
#SetEnv TZ :/etc/localtime

<IfModule mod_quotatab.c>
QuotaEngine off
</IfModule>

<IfModule mod_ratio.c>
Ratios off
</IfModule>


# Delay engine reduces impact of the so-called Timing Attack described in
# http://www.securityfocus.com/bid/11430/discuss
# It is on by default. 
<IfModule mod_delay.c>
DelayEngine on
</IfModule>

<IfModule mod_ctrls.c>
ControlsEngine        off
ControlsMaxClients    2
ControlsLog           /var/log/proftpd/controls.log
ControlsInterval      5
ControlsSocket        /var/run/proftpd/proftpd.sock
</IfModule>

<IfModule mod_ctrls_admin.c>
AdminControlsEngine off
</IfModule>

#
# Alternative authentication frameworks
#
#Include /etc/proftpd/ldap.conf
#Include /etc/proftpd/sql.conf

#
# This is used for FTPS connections
#
#Include /etc/proftpd/tls.conf

#
# Useful to keep VirtualHost/VirtualRoot directives separated
#
#Include /etc/proftpd/virtuals.conf

# A basic anonymous configuration, no upload directories.

# <Anonymous ~ftp>
#   User                ftp
#   Group               nogroup
#   # We want clients to be able to login with "anonymous" as well as "ftp"
#   UserAlias           anonymous ftp
#   # Cosmetic changes, all files belongs to ftp user
#   DirFakeUser on ftp
#   DirFakeGroup on ftp
# 
#   RequireValidShell       off
# 
#   # Limit the maximum number of anonymous logins
#   MaxClients          10
# 
#   # We want 'welcome.msg' displayed at login, and '.message' displayed
#   # in each newly chdired directory.
#   DisplayLogin            welcome.msg
#   DisplayChdir        .message
# 
#   # Limit WRITE everywhere in the anonymous chroot
#   <Directory *>
#     <Limit WRITE>
#       DenyAll
#     </Limit>
#   </Directory>
# 
#   # Uncomment this if you're brave.
#   # <Directory incoming>
#   #   # Umask 022 is a good standard umask to prevent new files and dirs
#   #   # (second parm) from being group and world writable.
#   #   Umask               022  022
#   #            <Limit READ WRITE>
#   #            DenyAll
#   #            </Limit>
#   #            <Limit STOR>
#   #            AllowAll
#   #            </Limit>
#   # </Directory>
# 
# </Anonymous>

# Include other custom configuration files
Include /etc/proftpd/conf.d/
#
#/etc/proftpd/proftpd.conf——这是一个基本的proftpd配置文件。
#若要真正应用更改,请在修改后重新加载proftpd(如果需要)
#它以守护程序模式运行。在inetd/xinetd模式下不需要它。
# 
#包括DSO模块
Include/etc/proftpd/modules.conf
#设置为禁用IPv6支持,这在仅IPv4的框中很烦人。
在上使用IPv6
#如果设置为on,在许多情况下,您可能会经历更长的连接延迟。
查找
服务器名“Debian”
服务器类型独立
欢迎离开
多线程C2228打开
默认服务器打开
在上显示符号链接
超时不传输600
时间超过了600分钟
超时空闲1200
DisplayLogin welcome.msg
displaychir.messagetrue
列表选项“-l”
DenyFilter\**/
#使用此选项可将所有用户监禁在家中
#默认根~
#用户需要/etc/shell中列出的有效shell才能登录。
#使用此指令释放该约束。
#需要重新验证滚
#端口21是标准的FTP端口。
端口21
#在某些情况下,必须将被动端口范围指定为旁路
#防火墙限制。临时端口可以用于此,但是
#请随意使用更窄的范围。
#无源端口49152 65534
#如果您的主机被NATted,此选项对于
#允许被动变速器工作。你必须使用你的公用电话
#地址和打开防火墙上使用的被动端口。
#伪装地址1.2.3.4
#这对于使用动态IP伪装地址非常有用:
#每8小时刷新一次配置的伪装地址指令
#Dynmasq28800
#要防止DoS攻击,请设置子进程的最大数目
#到30岁。如果需要允许30个以上的并发连接
#立即增加该值即可。请注意,这只起作用
#在独立模式下,在inetd模式下,您应该使用inetd服务器
#这允许您限制每个服务的最大进程数
#(如xinetd)
最大实例30
#设置服务器正常运行的用户和组。
用户proftpd
群非群
#Umask 022是一个很好的标准Umask,用于防止新文件和目录
#(第二个参数)从组和世界可写。
乌马斯克022 022
#通常,我们希望文件是可覆盖的。
允许覆盖
#如果您通过NSS使用NIS或LDAP检索密码,请取消对此的注释:
#持续传球
#这是使用基于PAM的身份验证和本地密码所必需的
#AuthOrder mod_auth_pam.c*mod_auth_unix.c
#请注意:使用此指令会影响CPU平均负载!
#如果您想查看ftpwho的进度和传输速率,请取消对此的注释
#在下载中。上传速率不需要这样做。
#
#使用发送文件关闭
TransferLog/var/log/proftpd/xferlog
SystemLog/var/log/proftpd/proftpd.log
#登录到/var/log/lastlog已启用,但默认设置为关闭
#使用上次登录
#为了在chroot之后保持日志文件日期的一致性,请使用时区信息
#来自/etc/localtime。如果未设置,且proftpd配置为
#chroot(例如DefaultRoot或),它将使用非日光
#节省时区,无论DST是否生效。
#SetEnv TZ:/etc/localtime
引述发动机关闭
比率差
#延迟引擎减少了中所述的所谓定时攻击的影响
# http://www.securityfocus.com/bid/11430/discuss
#默认情况下,它处于启用状态。
延迟发动机打开
控制发动机关闭
ControlsExclients 2
ControlsLog/var/log/proftpd/controls.log
控制第5节
ControlsSocket/var/run/proftpd/proftpd.sock
管理控制发动机关闭
#
#替代认证框架
#
#Include/etc/proftpd/ldap.conf
#Include/etc/proftpd/sql.conf
#
#这用于FTPS连接
#
#Include/etc/proftpd/tls.conf
#
#有助于保持VirtualHost/VirtualRoot指令分开
#
#Include/etc/proftpd/virtuals.conf
#一个基本的匿名配置,没有上传目录。
# 
#用户ftp
#群非群
##我们希望客户能够使用“匿名”和“ftp”登录
#UserAlias匿名ftp
##外观更改,所有文件属于ftp用户
#ftp上的DirFakeUser
#ftp上的DirFakeGroup
# 
#需要重新验证滚
# 
##限制匿名登录的最大数量
#MaxClients 10
# 
##我们希望登录时显示“welcome.msg”,并显示“.message”
##在每个新创建的目录中。
#DisplayLogin welcome.msg
#displaychir.message
# 
##限制匿名chroot中的所有内容
#   
#     
#丹亚尔
#     
#   
# 
##如果你有勇气,请取消注释。
#   # 
###Umask 022是一个很好的标准Umask,用于防止新文件和目录
####(第二个参数)从组和世界可写。
##乌马斯克022 022
#   #            
##登亚尔
#   #            
#   #            
##异壁
#   #            
#   # 
# 
# 
#包括其他自定义配置文件
Include/etc/proftpd/conf.d/

您需要将FTP服务器配置为被动服务器,并为其提供弹性ip。谢谢,我为那些不知道弹性ip地址的好奇者解决了这个问题: