AWS-EC2 - vsftpd: Falha ao recuperar o conteúdo do diretório / - somente em editores de texto

1

Eu tenho um problema muito estranho durante a configuração do vsftpd na minha instância do ec2: Eu configurei o servidor ftp para usar ftp sobre TLS e funcionou bem no filezilla, no entanto eu não consegui conectar usando qualquer módulo ftp editores de texto (eu tentei com notepad ++ e webstorm). Eu pensei que talvez o problema com o SSL, então eu mudei primeiro para FTP simples e inseguro e tente fazê-lo funcionar. Agora os clientes FTP funcionam como um charme novamente (filezilla, total commander), mas os editores de texto acima me dão o seguinte erro após a conexão com sucesso:

Failure retrieving contents of directory /

Eu tentei de tudo, mas por enquanto não tenho ideia de qual seria o problema. Aqui estão minhas configurações 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

Alguém tem alguma idéia de qual deve ser o problema? Toda ajuda é bem vinda. Obrigado.

UPDATE (logs do lado do servidor)

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."

Log do próprio 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
    
por Zsoca 14.01.2017 / 20:11

1 resposta

1

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)."

Isso parece um bug do servidor FTP vsftpd, quando o público pasv_address está definido e o servidor tem um endereço IPv6 (local) (como é o caso do EC2).

Eu postei mais sobre o bug na questão de falha do servidor Resposta passiva Vsftpd com endereço 0,0,0,0 mesmo com correção pasv_address .

O FileZilla pode ignorar o endereço IP inválido:

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.

Mas o Notepad ++ não pode.

    
por 14.01.2017 / 21:26