5

I'm trying to connect to a CentOS Linux box that I have hosted on EC2 and I think I have everything configured correctly but when I try to connect I get this series of messages

Status: Connection established, waiting for welcome message...
Response: 220 (vsFTPd 2.0.5)
Command: USER tyndall Response: 331 Please specify the password.
Command: PASS *********
Response: 230 Login successful.
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/home/tyndall"
Command: TYPE I
Response: 200 Switching to Binary mode.
Command: PASV Error: Connection timed out Error: Failed to retrieve directory listing

Not sure where to start troubleshooting this issue. Any ideas? Do I need to change any permissions? I would think this ID has the ability to see my own home directory.

I am able to push/pull files from the command line version of FTP client working on Windows.

1 Answer 1

4

I solved this exact problem on one of my servers in the past; It was a Filezilla server on Windows Server 2008 also on EC2.

The solution: It was a matter of setting the passive port range on the ftp server & opening that same range in the EC2 Security Groups. You may even need to add the range to IPTables within CentOS if iptables is being used -- although you should consider turning off iptables as it is a bit redundant with EC2 Security Groups.

Have a look here: http://forum.filezilla-project.org/viewtopic.php?f=6&t=7315

[alt text][1] [1]:http://www.iainlbc.com/wp-content/uploads/2011/01/security_groups.png

You could also configure VSFTPd to use active (not passive) mode - so it uses only port 20/21. The difference between active and passive is explained here: http://www.slacksite.com/other/ftp.html

5
  • If I'm just using plain old FTP wouldn't I only need port 20 and 21 open? I'm adding this to the question, but I am able to push/pull files from the command line version of FTP client working on Windows.
    – Tyndall
    Jan 14, 2011 at 5:22
  • In PASV move the client initiates both connections right? 20 and 21. Am I supposed to be reading the Network Configuration guide? I don't see the solution in the forum post.
    – Tyndall
    Jan 14, 2011 at 5:30
  • your problem is extremely common and the solution is just a matter of using the right search terms in google. "CentOS vsftpd failed to retrieve directory listing" should provide sufficient results to resolve your issue. good luck!
    – iainlbc
    Jan 14, 2011 at 5:30
  • 1
    Thanks for your help. +1. Got me on the right path. This is what fixed it for me. gosquared.com/liquidicity/archives/936
    – Tyndall
    Jan 14, 2011 at 5:50
  • fantastic - happy to help and thanks for linking the solution
    – iainlbc
    Jan 14, 2011 at 18:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .