24

Using my administrator account, I FTP connected to my IIS 7.5 FTP Site with FileZilla. I was able to successfully upload a file, but I keep getting a "Failed to retrieve directory listing" in response.

In passive mode, the command, response and error are:

Command:    LIST
Response:   150 Opening BINARY mode data connection.
Response:   550 The network connection was aborted by the local system. 
Error:  Failed to retrieve directory listing

In active mode, the command, response and error are:

Command:    PORT 192,168,1,129,102,151
Response:   501 Server cannot accept argument.
Error:  Failed to retrieve directory listing

What have I done wrong?

smartcaveman
  • 685
  • 2
  • 8
  • 18

8 Answers8

22

I had this issue as well, and it was related to the data ports being selected by IIS. I set it up to use a specific port range but when my client tried to use passive mode it showed that it was using the wrong port.

This article describes the method for calculating which port it is using. e.g.

227 Entering Passive Mode (x1,x2,x3,x4,y1,y2)

The IP it would be using is x1.x2.x3.x4 and port (y1*256) + y2. I was seeing the wrong values for y1 and y2 so I had to restart "Microsoft FTP Service" to actually get it to recognize the values I had set in the FTP Firewall Settings in IIS.

Jake Anderson
  • 321
  • 2
  • 4
  • 6
    Thanks. Restarting the Microsoft FTP Service solved the issue for me. – Shiv Jul 06 '15 at 01:57
  • My server's IP changed -- this revealed that the old IP was in use somewhere... Hrmph – mejdev Jan 13 '16 at 20:01
  • It was the "External IP Address of Firewall" in the "Firewall Support" section -- optional according to https://www.iis.net/configreference/system.applicationhost/sites/site/ftpserver/firewallsupport – mejdev Jan 13 '16 at 20:12
  • I created an account just so I could upvote. I also had to restart the Microsoft FTP Service for the port range to be applied. – germankiwi Jul 14 '20 at 22:19
6

For me, restart did not help, but disabling passive mode did.

Vitexikora
  • 161
  • 1
  • 1
3

Sounds like Firewall configuration issue. Please have a look at this article (if you have not done it already): http://learn.iis.net/page.aspx/309/configuring-ftp-firewall-settings/

LazyOne
  • 3,064
  • 1
  • 18
  • 16
2

I had same problem, but I've got a solution.

Check your location path ftp directory and add user everyone with full access for this folder.

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
BewareQQ
  • 21
  • 2
2

Here is a solution from Microsoft.

http://www.iis.net/configreference/system.applicationhost/sites/sitedefaults/ftpserver/directorybrowse

Installing the FTP Extensibility feature and enabling listing under Directory browsing, solved my issue.

Faiz
  • 121
  • 3
1

I had the same error on Windows 2008 Server and had to allow everything (Passive ports) on both my firewall and on Windows Firewall (Public Profile) and had to upgrade from IIS 6.0 FTP to IIS 7.5 FTP.

1

Ran into the same exact issue and after setting up FTP Firewall Support in IIS to match my external IP, still had the issue. As a last step, I went to edit the actual FTP rule in the Windows Firewall and allowed Edge traversal -> Allow Edge Traversal under the Advanced tab hit Apply/OK and restarted the FTPSVC in the Services. After that I no longer had any issues.

vandsh
  • 111
  • 2
1

the 2nd post in this thread helped me:

Cannot list directory on IIS FTP Passive

i ran this from the commandline: netsh advfirewall set global StatefulFtp enable net stop ftpsvc net start ftpsvc

StealthOne
  • 11
  • 1