AWS-EC2 - vsftpd: 디렉토리의 콘텐츠 검색 실패 / - 텍스트 편집기에서만

AWS-EC2 - vsftpd: 디렉토리의 콘텐츠 검색 실패 / - 텍스트 편집기에서만

EC2 인스턴스에서 vsftpd를 구성하는 동안 매우 이상한 문제가 발생했습니다. TLS를 통해 ftp를 사용하도록 ftp 서버를 구성했고 filezilla에서는 제대로 작동했지만 텍스트 편집기 ftp 모듈을 사용하여 연결할 수 없었습니다. notepad++ 및 webstorm을 사용해 보았습니다). 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

문제가 무엇인지 아는 사람이 있습니까? 모든 도움을 환영합니다. 감사해요.

업데이트(서버 측 로그)

파일질라:

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"

메모장++:

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

답변1

Sat Jan 14 20:01:38 2017 [pid 8103] [dev_back] FTP 응답: 클라이언트 "::ffff:178.48.165.229", "227 수동 모드 입력(0,0,0,0,4,2)."

이는 공개가 pasv_address설정되고 서버에 (로컬) IPv6 주소가 있는 경우(EC2의 경우) vsftpd FTP 서버의 버그처럼 보입니다.

서버 오류 질문에 대한 버그에 대해 더 자세히 게시했습니다.올바른 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++는 그럴 수 없습니다.

관련 정보