Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've got Ubuntu 10.04 Desktop running as a web server and have just installed vsftpd and set it up to allow ascii_upload_enable and ascii_download_enable and also enabled chroot_local_user, chroot_list_enable and chroot_list_file.

However, I'm having trouble getting a file listing back from the server using FileZilla, this is what happens:

Status: Resolving address of server.jonbevan.me.uk
Status: Connecting to 80.4.79.179:21...
Status: Connection established, waiting for welcome message...
Response: 220 Welcome to server.jonbevan.me.uk FTP service.
Command: USER jon
Response: 331 Please specify the password.
Command: PASS ***
Response: 230 Login successful.
Command: OPTS UTF8 ON
Response: 200 Always in UTF8 mode.
Status: Connected
Status: Retrieving directory listing...
Command: CWD /home/jon
Response: 250 Directory successfully changed.
Command: PWD
Response: 257 "/home/jon"
Command: TYPE I
Response: 200 Switching to Binary mode.
Command: PASV
Response: 227 Entering Passive Mode (80,4,79,179,196,13)
Command: LIST
Response: 425 Failed to establish connection.
Error: Failed to retrieve directory listing

And this happens in CuteFTP:

COMMAND:> [7/29/2010 3:23:43 PM] LIST
[7/29/2010 3:23:43 PM] 150 Here comes the directory listing.
ERROR:> [7/29/2010 3:24:13 PM] Timeout (30000 ms) occurred on accepting data connection from server.
[7/29/2010 3:24:13 PM] 426 Failure writing network stream.
ERROR:> [7/29/2010 3:24:13 PM] Trashed response received.

Any ideas what might be the problem? Apologies if I've missed out any important information.

share|improve this question

2 Answers 2

Agree with Luke404. Check that your vsftpd.conf has the following entries configured and your firewall allows the pasv_min & pasv_max port ranges (10000 - 100010 is just an example). Remember to restart the service if changes are made to the conf file.


    pasv_enable=YES
    pasv_min_port=10000
    pasv_max_port=10010
    pasv_address=[Public IP address of your server]

share|improve this answer

You are using PASV mode so your client will try to connect on a "random" port to the server to transfer data, this includes both file transfers and directory listings.

The most probable reason it isn't working is that the PASV TCP connection for data transfer cannot be established, usually for one of these reasons:

  • firewall on client side blocking outgoing connections
  • firewall on server side blocking incoming connections on high ports
  • server behind a NAT with only static ftp ports 21,22 forwarded and no packet inspection to statefully forward higher ports
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.