Does FTP Support TLS?

belltown

New member
I've just set up FileZilla 3.10.0.2 on Windows 7 as my FTP client.

I specify the following in FileZilla's Site Manager:

Host: ftp.belltown.gi9.co
Protocol: FTP - File Transfer Protocol
Encryption: Use explicit FTP over TLS if available [Note - this is the default option]
Logon Type: Normal
User: belltown
Password: <my password>
Default remote directory: /public_html

The connection appears to work, but the connection times out when attempting to retrieve the directory listing. Here's the debug log:

Code:
Status:	Resolving address of ftp.belltown.gi9.co
Status:	Connecting to 37.187.74.24:21...
Status:	Connection established, waiting for welcome message...
Status:	Initializing TLS...
Status:	Verifying certificate...
Status:	TLS connection established.
Status:	Server does not support non-ASCII characters.
Status:	Connected
Trace:	Measured latency of 197 ms
Status:	Retrieving directory listing of "/public_html"...
Trace:	CFtpControlSocket::SendNextCommand()
Trace:	CFtpControlSocket::ChangeDirSend()
Command:	CWD /public_html
Trace:	CTlsSocket::OnRead()
Trace:	CFtpControlSocket::OnReceive()
Response:	250 OK. Current directory is /public_html
Trace:	CFtpControlSocket::SendNextCommand()
Trace:	CFtpControlSocket::ChangeDirSend()
Command:	PWD
Trace:	CTlsSocket::OnRead()
Trace:	CFtpControlSocket::OnReceive()
Response:	257 "/public_html" is your current location
Trace:	CFtpControlSocket::ResetOperation(0)
Trace:	CControlSocket::ResetOperation(0)
Trace:	CFtpControlSocket::ParseSubcommandResult(0)
Trace:	CFtpControlSocket::ListSubcommandResult()
Trace:	  state = 1
Trace:	CFtpControlSocket::SendNextCommand()
Trace:	CFtpControlSocket::TransferSend()
Trace:	  state = 1
Command:	TYPE I
Trace:	CTlsSocket::OnRead()
Trace:	CFtpControlSocket::OnReceive()
Response:	200 TYPE is now 8-bit binary
Trace:	CFtpControlSocket::TransferParseResponse()
Trace:	  code = 2
Trace:	  state = 1
Trace:	CFtpControlSocket::SendNextCommand()
Trace:	CFtpControlSocket::TransferSend()
Trace:	  state = 2
Command:	PASV
Trace:	CTlsSocket::OnRead()
Trace:	CFtpControlSocket::OnReceive()
Response:	227 Entering Passive Mode (37,187,74,24,69,125)
Trace:	CFtpControlSocket::TransferParseResponse()
Trace:	  code = 2
Trace:	  state = 2
Trace:	CFtpControlSocket::SendNextCommand()
Trace:	CFtpControlSocket::TransferSend()
Trace:	  state = 4
Command:	MLSD
Error:	Connection timed out
Trace:	CControlSocket::DoClose(2050)
Trace:	CFtpControlSocket::ResetOperation(2114)
Trace:	CControlSocket::ResetOperation(2114)
Trace:	CFtpControlSocket::ResetOperation(2114)
Trace:	CControlSocket::ResetOperation(2114)
Error:	Failed to retrieve directory listing
Trace:	CFileZillaEnginePrivate::ResetOperation(2114)

However, if I change the Encryption to: "Only use plain FTP (insecure)" then I am able to get a directory listing:

Code:
Status:	Resolving address of ftp.belltown.gi9.co
Status:	Connecting to 37.187.74.24:21...
Status:	Connection established, waiting for welcome message...
Status:	Server does not support non-ASCII characters.
Status:	Connected
Trace:	Measured latency of 199 ms
Status:	Retrieving directory listing of "/public_html"...
Trace:	CFtpControlSocket::SendNextCommand()
Trace:	CFtpControlSocket::ChangeDirSend()
Command:	CWD /public_html
Trace:	CFtpControlSocket::OnReceive()
Response:	250 OK. Current directory is /public_html
Trace:	CFtpControlSocket::SendNextCommand()
Trace:	CFtpControlSocket::ChangeDirSend()
Command:	PWD
Trace:	CFtpControlSocket::OnReceive()
Response:	257 "/public_html" is your current location
Trace:	CFtpControlSocket::ResetOperation(0)
Trace:	CControlSocket::ResetOperation(0)
Trace:	CFtpControlSocket::ParseSubcommandResult(0)
Trace:	CFtpControlSocket::ListSubcommandResult()
Trace:	  state = 1
Trace:	CFtpControlSocket::SendNextCommand()
Trace:	CFtpControlSocket::TransferSend()
Trace:	  state = 1
Command:	TYPE I
Trace:	CFtpControlSocket::OnReceive()
Response:	200 TYPE is now 8-bit binary
Trace:	CFtpControlSocket::TransferParseResponse()
Trace:	  code = 2
Trace:	  state = 1
Trace:	CFtpControlSocket::SendNextCommand()
Trace:	CFtpControlSocket::TransferSend()
Trace:	  state = 2
Command:	PASV
Trace:	CFtpControlSocket::OnReceive()
Response:	227 Entering Passive Mode (37,187,74,24,218,41)
Trace:	CFtpControlSocket::TransferParseResponse()
Trace:	  code = 2
Trace:	  state = 2
Trace:	CFtpControlSocket::SendNextCommand()
Trace:	CFtpControlSocket::TransferSend()
Trace:	  state = 4
Command:	MLSD
Trace:	CTransferSocket::OnConnect
Trace:	CTransferSocket::OnReceive(), m_transferMode=0
Trace:	CTransferSocket::OnReceive(), m_transferMode=0
Listing:	type=cdir;sizd=4096;modify=20141128201437;UNIX.mode=0750;UNIX.uid=645;UNIX.gid=99;unique=903g4c7c00c; .
Listing:	type=pdir;sizd=4096;modify=20150123200914;UNIX.mode=0711;UNIX.uid=645;UNIX.gid=645;unique=903g4c7c001; ..
Listing:	type=file;size=866;modify=20141106163848;UNIX.mode=0644;UNIX.uid=645;UNIX.gid=645;unique=903g4c7c070; .htaccess
.
.
.
Trace:	CTransferSocket::TransferEnd(1)
Trace:	CFtpControlSocket::TransferEnd()
Trace:	CFtpControlSocket::OnReceive()
Response:	150 Accepted data connection
Trace:	CFtpControlSocket::TransferParseResponse()
Trace:	  code = 1
Trace:	  state = 6
Trace:	CFtpControlSocket::SendNextCommand()
Trace:	CFtpControlSocket::TransferSend()
Trace:	  state = 7
Trace:	CFtpControlSocket::OnReceive()
Response:	226-Options: -a -l 
Response:	226 20 matches total
Trace:	CFtpControlSocket::TransferParseResponse()
Trace:	  code = 2
Trace:	  state = 7
Trace:	CFtpControlSocket::ResetOperation(0)
Trace:	CControlSocket::ResetOperation(0)
Trace:	CFtpControlSocket::ParseSubcommandResult(0)
Trace:	CFtpControlSocket::ListSubcommandResult()
Trace:	  state = 3
Trace:	CFtpControlSocket::ResetOperation(0)
Trace:	CControlSocket::ResetOperation(0)
Status:	Directory listing of "/public_html" successful
Trace:	CFileZillaEnginePrivate::ResetOperation(0)

Why does the "Use explicit FTP over TLS if available" option not work? It seems that TLS is available and it does indeed establish a TLS connection. However, when trying to use that connection to display a directory listing, that operation fails. I've had no problem using TLS on another host that I use, which I have set up in exactly the same way. I'm concerned about the inherent security risk of using the "Only use plain FTP (insecure)" option.
 

un4saken

Administrator
You're welcome.
Feel free to post in this thread if you have another problem with TLS connection.

Marking as solved.