Title:
CFFTP LISTDIR Command Fails against FTP servers that do not allow the SYST command
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Wil Genovese / Wil Genovese (Wil Genovese)
Created: 07/29/2014
Components: Net Protocols, FTP
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF11_Final / CF10_Update14
Priority/Frequency: Major / Most users will encounter
Locale/System: English / Win 2008 Server R2 64 bit
Vote Count: 1
Problem Description: CFFTP LISTDIR command fails against FTP servers that do not allow the SYST command.
Steps to Reproduce:
Test against different FTP servers and you will find this does not work on FTP servers that do not allow the SYST command.
Here is code to test:
<cfscript>
ftpServer = '';
userName = '';
pw = "";
</cfscript>
<cfftp action="open" username="#userName#" connection="myFtp" password="#pw#" server="#ftpServer#" stopOnError="no" passive="true" />
<cfoutput>
FTP connection Open: #cfftp.succeeded#<br>
</cfoutput>
<cfdump var="#cfftp#">
<cfftp action="listdir" stoponerror="false" name="filelist" directory="./" connection="myFtp" passive="true">
<cfdump var="#cfftp#">
<cfdump var="#filelist#" label="filelist">
<cfftp action="close" connection="myFtp" stopOnError = "Yes">
Actual Result:
215 ERROR
When the LISTDIR command executes the SYST command must get executed first in order to determine the type of FTP server. I see this in regular FTP clients too. In most cases I see the 215 fail in a FTP client and the client simply ignores the response and goes on to the next command.
Here in ColdFusion CFFTP does NOT ignore the error even though the stopOnError attribute is set to false. I was able to see where the actual failure happened by using Wireshark to monitor the FTP network traffic created by CFFTP and I attached a screenshot of the error message as seen in Wireshark.
Expected Result:
Expected a directory listing
Any Workarounds:
None
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3796626
External Customer Info:
External Company:
External Customer Name: Wilgeno
External Customer Email:
External Test Config: I have tested this with ColdFusion 10 and 11 and I get the same results.
Attachments:
- July 30, 2014 00:00:00: 1_CFFTP_LISTDIR.png
Comments: