1

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.

3 Answers 3

4

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]

2

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
0

I had this same problem

Solved this, editing config of /etc/sysconfig/iptables-config

in the begining of the file, changed this parameter: IPTABLES_MODULES

# Load additional iptables modules (nat helpers)
#   Default: -none-
# Space separated list of nat helpers (e.g. 'ip_nat_ftp ip_nat_irc'), which
# are loaded after the firewall rules are applied. Options for the helpers are
# stored in /etc/modprobe.conf.
IPTABLES_MODULES="ip_conntrack_ftp"

After restart iptables, could list the files in FileZilla. Hope it helps.

You must log in to answer this question.

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