FTP to one particular server not working

FTP works fine for me apart from trying to connect to one particular plain ftp server that is on my local network, running ftpd.

I tried the suggestions from the FTP FAQ. I am using latest stable Directory Opus.

FileZilla works fine, which makes me believe it has to do with Opus.

Here's the Opus Log:

Opening Connection 192.168.0.112:5000
220 Hello!
--> USER anonymous
230 OK
--> SYST
215 UNIX Type: L8
--> FEAT
211-
 MDTM
 MLST Type*;Size*;Modify*;Perm*;UNIX.mode;
 PASV
 SIZE
 TVFS
 UTF8
211 End
--> OPTS MLST type;modify;size;unix.mode;
200 MLST OPTS Type;Size;Modify;UNIX.mode;
--> OPTS UTF8 ON
200 OK
--> TYPE I
200 OK
--> REST 100
200 OK
--> TYPE A
200 OK
--> PWD
257 "/"
--> PASV
227 192,168,0,112,148,49
Pasv_Connect() - WSAEADDRNOTAVAIL: Can't assign requested address
--> CWD /
200 OK
--> PWD
257 "/"
--> PORT 192,168,0,245,248,108
200 OK
--> MLSD
425 Can't open data connection
--> PORT 192,168,0,245,248,109
200 OK
--> MLSD
425 Can't open data connection
--> PORT 192,168,0,245,248,110
200 OK
--> MLSD
425 Can't open data connection
--> PORT 192,168,0,245,248,111
200 OK
--> MLSD
425 Can't open data connection
--> PORT 192,168,0,245,248,112
200 OK
--> MLSD
425 Can't open data connection
--> PORT 192,168,0,245,248,113
200 OK
--> MLSD
425 Can't open data connection
--> PORT 192,168,0,245,248,114
200 OK
--> MLSD
425 Can't open data connection
--> PORT 192,168,0,245,248,115
200 OK
--> MLSD
425 Can't open data connection
--> PORT 192,168,0,245,248,116
200 OK
--> MLSD
425 Can't open data connection
Connection closed

Filezilla log, where it works:

Status:	Connecting to 192.168.0.112:5000...
Status:	Connection established, waiting for welcome message...
Response:	220 Hello!
Status:	Plain FTP is insecure. Please switch to FTP over TLS.
Command:	USER anonymous
Response:	230 OK
Command:	OPTS UTF8 ON
Response:	200 OK
Command:	OPTS MLST type;size;modify;perm;unix.mode;
Response:	200 MLST OPTS Type;Size;Modify;Perm;UNIX.mode;
Status:	Logged in
Status:	Retrieving directory listing...
Status:	Directory listing of "/" successful
Status:	Disconnected from server
Status:	Connecting to 192.168.0.112:5000...
Status:	Connection established, waiting for welcome message...
Status:	Plain FTP is insecure. Please switch to FTP over TLS.
Status:	Logged in
Status:	Retrieving directory listing...
Status:	Directory listing of "/" successful
Status:	Disconnected from server
Trace:	CFtpControlSocket::ResetOperation(66)
Trace:	CControlSocket::ResetOperation(66)
Trace:	CFtpControlSocket::ResetOperation(66)
Trace:	CControlSocket::ResetOperation(66)
Trace:	CControlSocket::ResetOperation(66)
Trace:	CControlSocket::SendNextCommand()
Trace:	CFtpLogonOpData::Send() in state 0
Status:	Connecting to 192.168.0.112:5000...
Status:	Connection established, waiting for welcome message...
Trace:	CFtpControlSocket::OnReceive()
Response:	220 Hello!
Trace:	CFtpLogonOpData::ParseResponse() in state 1
Trace:	CControlSocket::SendNextCommand()
Trace:	CFtpLogonOpData::Send() in state 5
Status:	Plain FTP is insecure. Please switch to FTP over TLS.
Trace:	CFtpControlSocket::SetAsyncRequestReply
Trace:	CControlSocket::SendNextCommand()
Trace:	CFtpLogonOpData::Send() in state 6
Command:	USER anonymous
Trace:	CFtpControlSocket::OnReceive()
Response:	230 OK
Trace:	CFtpLogonOpData::ParseResponse() in state 6
Trace:	CControlSocket::SendNextCommand()
Trace:	CFtpLogonOpData::Send() in state 10
Command:	OPTS UTF8 ON
Trace:	CFtpControlSocket::OnReceive()
Response:	200 OK
Trace:	CFtpLogonOpData::ParseResponse() in state 10
Trace:	CControlSocket::SendNextCommand()
Trace:	CFtpLogonOpData::Send() in state 13
Command:	OPTS MLST type;size;modify;perm;unix.mode;
Trace:	CFtpControlSocket::OnReceive()
Response:	200 MLST OPTS Type;Size;Modify;Perm;UNIX.mode;
Trace:	CFtpLogonOpData::ParseResponse() in state 13
Status:	Logged in
Trace:	Measured latency of 3 ms
Trace:	CFtpControlSocket::ResetOperation(0)
Trace:	CControlSocket::ResetOperation(0)
Trace:	CFtpLogonOpData::Reset(0) in state 15
Trace:	CControlSocket::SendNextCommand()
Trace:	CFtpListOpData::Send() in state 0
Status:	Retrieving directory listing...
Trace:	CFtpChangeDirOpData::Send() in state 0
Trace:	CFtpChangeDirOpData::Send() in state 1
Command:	PWD
Trace:	CFtpControlSocket::OnReceive()
Response:	257 "/"
Trace:	CFtpChangeDirOpData::ParseResponse() in state 1
Trace:	CFtpControlSocket::ResetOperation(0)
Trace:	CControlSocket::ResetOperation(0)
Trace:	CFtpChangeDirOpData::Reset(0) in state 1
Trace:	CFtpListOpData::SubcommandResult(0) in state 1
Trace:	CControlSocket::SendNextCommand()
Trace:	CFtpListOpData::Send() in state 2
Trace:	CFtpControlSocket::ResetOperation(0)
Trace:	CControlSocket::ResetOperation(0)
Trace:	CFtpListOpData::Reset(0) in state 2
Status:	Directory listing of "/" successful

Here's what happens if I disable PASV in Opus:

Opening Connection 192.168.0.112:5000
220 Hello!
--> USER anonymous
230 OK
--> SYST
215 UNIX Type: L8
--> FEAT
211-
 MDTM
 MLST Type*;Size*;Modify*;Perm*;UNIX.mode;
 PASV
 SIZE
 TVFS
 UTF8
211 End
--> OPTS MLST type;modify;size;unix.mode;
200 MLST OPTS Type;Size;Modify;UNIX.mode;
--> OPTS UTF8 ON
200 OK
--> TYPE I
200 OK
--> REST 100
200 OK
--> TYPE A
200 OK
--> PWD
257 "/"
--> PORT 192,168,0,245,248,158
200 OK
--> MLSD
425 Can't open data connection
--> CWD /
200 OK
--> PWD
257 "/"
--> PORT 192,168,0,245,248,159
200 OK
--> MLSD
425 Can't open data connection
--> PORT 192,168,0,245,248,160
200 OK
--> MLSD
425 Can't open data connection
--> PORT 192,168,0,245,248,161
200 OK
--> MLSD
425 Can't open data connection
--> PORT 192,168,0,245,248,162
200 OK
--> MLSD
425 Can't open data connection
--> PORT 192,168,0,245,248,163
200 OK
--> MLSD
425 Can't open data connection
--> PORT 192,168,0,245,248,164
200 OK
--> MLSD
425 Can't open data connection
--> PORT 192,168,0,245,248,165
200 OK
--> MLSD
425 Can't open data connection
--> PORT 192,168,0,245,248,166
200 OK
--> MLSD
425 Can't open data connection
--> PORT 192,168,0,245,248,167
200 OK
--> MLSD
425 Can't open data connection
Connection closed

Why is Opus doing all this MLSD business, which doesn't seem to work?

MLSD is the command to retrieve the directory list, which your server says it supports.

It looks like it's having trouble opening the data connection to retrieve the folder listing. Maybe check that your firewall isn't blocking the connection.

1 Like

Thank you for the quick response.

It looks like I already have Opus enabled in my inbound Firewall rules:

Is there maybe another rule I need? It seems Filezilla doesn't have or need any rules to work, but maybe I am just not seeing it.

Nevermind, it looks like it was a bug in the ftpd server. There was a recent minor upgrade and now after upgrading the server, it suddenly works :slight_smile:

I should have checked for server updates before posting here, sorry.

New log, now working:

Opening Connection 192.168.0.112:5000
220 Hello!
--> USER anonymous
230 OK
--> SYST
215 UNIX Type: L8
--> FEAT
211-
 MDTM
 MLST Type*;Size*;Modify*;Perm*;UNIX.mode;
 PASV
 SIZE
 TVFS
 UTF8
211 End
--> OPTS MLST type;modify;size;unix.mode;
200 MLST OPTS Type;Size;Modify;UNIX.mode;
--> OPTS UTF8 ON
200 OK
--> TYPE I
200 OK
--> REST 100
200 OK
--> TYPE A
200 OK
--> PWD
257 "/"
--> PASV
227 Entering Passive Mode (192,168,0,112,215,68).
--> MLSD
150 Ready
1857 bytes received in 0.27 seconds (66.416 Kbytes/sec)
226 OK
1 Like

For the record, the problem occured with the homebrew ftpd 3.0.0 server on jailbroken Nintendo Switch, and was fixed by upgrading ftpd to 3.1.0.