Cyberduck Mountain Duck CLI

#1353 closed defect (fixed)

FTP cannot list directory

Reported by: Owned by: dkocher
Priority: high Milestone: 2.8.2
Component: ftp Version: 2.8.1
Severity: major Keywords:
Cc: Architecture:


I have been trying to FTP into my web space. It works fine via the shell. With Cyberduck, it seems its connecting to the web space, but fails to list the files in the directory and disconnects.

I am not sure why. I have tried both FTP and FTP-SSL.

FYI -Bulent

Change History (5)

comment:1 Changed on Nov 29, 2007 at 2:57:32 PM by dkocher

What is the error message in Cyberduck (if any)? Please paste here to output of the 'ls' command when connecting with 'ftp' from the

comment:2 Changed on Nov 30, 2007 at 12:14:04 AM by soka

I was playing around a bit with this, I posted my comments to :

I think this issue is the same as : 1302 and 1172

comment:3 Changed on Dec 3, 2007 at 11:10:58 PM by soka



createDataSocket() -> createDataSocketPASV()


"new FTPPassiveDataSocket(new Socket(ipAddress, port));"

This line of code is causing trouble. In case of passive mode "new Socket" might time out. In that casel a ConnectException is thrown. This exception is not taken to consideration. The 'fallback' is only watching 'FTPException' which in this case is not thrown, therefore there is no fallback to 'active' mode.

SUGGESTION: imho the current implementation is not taking care of the timeout. To my understanding, according to j2se/1.4.2/docs/api/java/net/Socket.html#setSoTimeout(int), it would be possible to get a

I'm not a huge java developer so this is just a suggestion, please drop it if it's not useful.

comment:4 Changed on Dec 4, 2007 at 9:53:15 PM by soka

I've spent some time with inspecting this further on. As I googled it, it seems it's impossible to set timeout for a new Socket, so here the code always have to wait 60 seconds. The setSoTimeout(int) or the socket.connect(ip, timeout), effects only already opened connections. Unfortunately in this case no specific exception is thrown, but ConnectException. ConnectException != TimeoutException, but maybe in this specific case it could be used to start a 'fallback' for the other type of connection. If both active and passive fails with ConnectException, a specific flag could be set, and user could be informed that there was a ConnectExcepion?

comment:5 Changed on Dec 6, 2007 at 9:06:44 PM by dkocher

  • Milestone set to 2.8.2
  • Resolution set to fixed
  • Status changed from new to closed

Applied (modified) patch in r3333.

Note: See TracTickets for help on using tickets.