Ec2インスタンスでのvsftpdの構成中に、非常に奇妙な問題が発生しました。ftpoverTLSを使用するようにftpサーバーを構成し、filezillaで正常に機能しましたが、テキストエディターのftpモジュールを使用して接続できませんでした(I notepad ++とwebstormで試しました)。 SSLに問題があるのではないかと思ったので、最初にSSLを単純な安全でないFTPに変更して、動作させるようにしました。これで、FTPクライアントは再びチャームのように機能します(filezilla、total commander)が、上記のテキストエディターは、接続に成功した後、次のエラーを表示します。
Failure retrieving contents of directory /
私はすべてを試しましたが、今のところ何が問題になるのかわかりません。これが私のvsftp設定です:
listen=NO
listen_ipv6=YES
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
chroot_list_enable=NO
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=ftp
ssl_enable=NO
pasv_enable=YES
pasv_min_port=1024
pasv_max_port=1048
port_enable=YES
pasv_address=[EC2_PUBLIC_DOMAIN]
pasv_addr_resolve=YES
誰かが何が問題になるべきか考えていますか?すべての助けを歓迎します。ありがとう。
[〜#〜] update [〜#〜](サーバー側のログ)
Filezilla:
Sat Jan 14 20:01:06 2017 [pid 8099] CONNECT: Client "::ffff:178.48.165.229"
Sat Jan 14 20:01:06 2017 [pid 8099] FTP response: Client "::ffff:178.48.165.229", "220 (vsFTPd 3.0.3)"
Sat Jan 14 20:01:06 2017 [pid 8099] FTP command: Client "::ffff:178.48.165.229", "AUTH TLS"
Sat Jan 14 20:01:06 2017 [pid 8099] FTP response: Client "::ffff:178.48.165.229", "530 Please login with USER and PASS."
Sat Jan 14 20:01:06 2017 [pid 8099] FTP command: Client "::ffff:178.48.165.229", "AUTH SSL"
Sat Jan 14 20:01:06 2017 [pid 8099] FTP response: Client "::ffff:178.48.165.229", "530 Please login with USER and PASS."
Sat Jan 14 20:01:06 2017 [pid 8099] FTP command: Client "::ffff:178.48.165.229", "USER dev_back"
Sat Jan 14 20:01:06 2017 [pid 8099] [dev_back] FTP response: Client "::ffff:178.48.165.229", "331 Please specify the password."
Sat Jan 14 20:01:06 2017 [pid 8099] [dev_back] FTP command: Client "::ffff:178.48.165.229", "PASS <password>"
Sat Jan 14 20:01:06 2017 [pid 8098] [dev_back] OK LOGIN: Client "::ffff:178.48.165.229"
Sat Jan 14 20:01:06 2017 [pid 8100] [dev_back] FTP response: Client "::ffff:178.48.165.229", "230 Login successful."
Sat Jan 14 20:01:06 2017 [pid 8100] [dev_back] FTP command: Client "::ffff:178.48.165.229", "PWD"
Sat Jan 14 20:01:06 2017 [pid 8100] [dev_back] FTP response: Client "::ffff:178.48.165.229", "257 "/" is the current directory"
Notepad ++:
Sat Jan 14 20:01:37 2017 [pid 8102] CONNECT: Client "::ffff:178.48.165.229"
Sat Jan 14 20:01:37 2017 [pid 8102] FTP response: Client "::ffff:178.48.165.229", "220 (vsFTPd 3.0.3)"
Sat Jan 14 20:01:37 2017 [pid 8102] FTP command: Client "::ffff:178.48.165.229", "USER dev_back"
Sat Jan 14 20:01:37 2017 [pid 8102] [dev_back] FTP response: Client "::ffff:178.48.165.229", "331 Please specify the password."
Sat Jan 14 20:01:37 2017 [pid 8102] [dev_back] FTP command: Client "::ffff:178.48.165.229", "PASS <password>"
Sat Jan 14 20:01:37 2017 [pid 8101] [dev_back] OK LOGIN: Client "::ffff:178.48.165.229"
Sat Jan 14 20:01:37 2017 [pid 8103] [dev_back] FTP response: Client "::ffff:178.48.165.229", "230 Login successful."
Sat Jan 14 20:01:37 2017 [pid 8103] [dev_back] FTP command: Client "::ffff:178.48.165.229", "TYPE A"
Sat Jan 14 20:01:37 2017 [pid 8103] [dev_back] FTP response: Client "::ffff:178.48.165.229", "200 Switching to ASCII mode."
Sat Jan 14 20:01:37 2017 [pid 8103] [dev_back] FTP command: Client "::ffff:178.48.165.229", "MODE S"
Sat Jan 14 20:01:37 2017 [pid 8103] [dev_back] FTP response: Client "::ffff:178.48.165.229", "200 Mode set to S."
Sat Jan 14 20:01:37 2017 [pid 8103] [dev_back] FTP command: Client "::ffff:178.48.165.229", "STRU F"
Sat Jan 14 20:01:37 2017 [pid 8103] [dev_back] FTP response: Client "::ffff:178.48.165.229", "200 Structure set to F."
Sat Jan 14 20:01:38 2017 [pid 8103] [dev_back] FTP command: Client "::ffff:178.48.165.229", "PWD"
Sat Jan 14 20:01:38 2017 [pid 8103] [dev_back] FTP response: Client "::ffff:178.48.165.229", "257 "/" is the current directory"
Sat Jan 14 20:01:38 2017 [pid 8103] [dev_back] FTP command: Client "::ffff:178.48.165.229", "CWD /"
Sat Jan 14 20:01:38 2017 [pid 8103] [dev_back] FTP response: Client "::ffff:178.48.165.229", "250 Directory successfully changed."
Sat Jan 14 20:01:38 2017 [pid 8103] [dev_back] FTP command: Client "::ffff:178.48.165.229", "PASV"
Sat Jan 14 20:01:38 2017 [pid 8103] [dev_back] FTP response: Client "::ffff:178.48.165.229", "227 Entering Passive Mode (0,0,0,0,4,2)."
Sat Jan 14 20:01:38 2017 [pid 8103] [dev_back] FTP command: Client "::ffff:178.48.165.229", "LIST"
Sat Jan 14 20:02:38 2017 [pid 8103] [dev_back] FTP response: Client "::ffff:178.48.165.229", "425 Failed to establish connection."
Filezilla独自のログ:
2017-01-14 21:27:41 4856 1 Response: 220 (vsFTPd 3.0.3)
2017-01-14 21:27:41 4856 1 Command: AUTH TLS
2017-01-14 21:27:41 4856 1 Response: 530 Please login with USER and PASS.
2017-01-14 21:27:41 4856 1 Command: AUTH SSL
2017-01-14 21:27:41 4856 1 Response: 530 Please login with USER and PASS.
2017-01-14 21:27:41 4856 1 Status: Insecure server, it does not support FTP over TLS.
2017-01-14 21:27:41 4856 1 Command: USER dev_back
2017-01-14 21:27:41 4856 1 Response: 331 Please specify the password.
2017-01-14 21:27:41 4856 1 Command: PASS ***********
2017-01-14 21:27:42 4856 1 Response: 230 Login successful.
2017-01-14 21:27:42 4856 1 Command: SYST
2017-01-14 21:27:42 4856 1 Response: 215 UNIX Type: L8
2017-01-14 21:27:42 4856 1 Command: FEAT
2017-01-14 21:27:42 4856 1 Response: 211-Features:
2017-01-14 21:27:42 4856 1 Response: EPRT
2017-01-14 21:27:42 4856 1 Response: EPSV
2017-01-14 21:27:42 4856 1 Response: MDTM
2017-01-14 21:27:42 4856 1 Response: PASV
2017-01-14 21:27:42 4856 1 Response: REST STREAM
2017-01-14 21:27:42 4856 1 Response: SIZE
2017-01-14 21:27:42 4856 1 Response: TVFS
2017-01-14 21:27:42 4856 1 Response: 211 End
2017-01-14 21:27:42 4856 1 Status: Server does not support non-ASCII characters.
2017-01-14 21:27:42 4856 1 Status: Logged in
2017-01-14 21:27:42 4856 1 Status: Retrieving directory listing...
2017-01-14 21:27:42 4856 1 Command: PWD
2017-01-14 21:27:42 4856 1 Response: 257 "/" is the current directory
2017-01-14 21:27:42 4856 1 Command: TYPE I
2017-01-14 21:27:42 4856 1 Response: 200 Switching to Binary mode.
2017-01-14 21:27:42 4856 1 Command: PASV
2017-01-14 21:27:42 4856 1 Response: 227 Entering Passive Mode (0,0,0,0,4,12).
2017-01-14 21:27:42 4856 1 Status: Server sent passive reply with unroutable address. Using server address instead.
2017-01-14 21:27:42 4856 1 Command: LIST
2017-01-14 21:27:42 4856 1 Response: 150 Here comes the directory listing.
2017-01-14 21:27:42 4856 1 Response: 226 Directory send OK.
2017-01-14 21:27:42 4856 1 Status: Directory listing of "/" successful
2017年1月14日土曜日20:01:38 [pid 8103] [dev_back] FTP応答:クライアント ":: ffff:178.48.165.229"、 "227パッシブモードに入る(0,0,0 、0、4,2)。」
これは、パブリックpasv_address
が設定されていて、サーバーに(ローカル)IPv6アドレスがある場合(EC2の場合)、vsftpdFTPサーバーのバグのように見えます。
サーバー障害の質問にバグの詳細を投稿しました 正しいpasv_addressを使用しても0,0,0,0アドレスのVsftpdパッシブ応答 。
FileZillaは無効なIPアドレスを無視できます:
2017-01-14 21:27:42 4856 1応答:227パッシブモード(0,0,0,0,4,12)に入ります。
2017-01-14 21:27:42 4856 1ステータス:サーバーがルーティングできないアドレスでパッシブ応答を送信しました。代わりにサーバーアドレスを使用します。
しかし、Notepad ++はできません。