Fix VSFTPD Slow Directory Listings & Timeouts

I’ve always had trouble with vsftpd and slow directory listings or timeouts, so I’ve generally avoided it.  With a little dedicated digging I finally managed to unearth how to get this working properly on a CentOS box.

All commands here are issued as root (use sudo -i to get a root shell if you don’t have access to the root account).

First of course you need to ensure that it’s installed and set to run at start up:

  • yum install vsftpd
  • chkconfig vsftpd on

If you’re running a firewall that it is configured to allow FTP traffic through.  My CentOS uses iptables:

  • service iptables stop
  • iptables -A INPUT -p tcp -m tcp –dport 21 -j ACCEPT
  • Open /etc/sysconfig/iptables-config in your favourite text editor.
  • Either add IPTABLES_MODULES="ip_conntrack_ftp" to the top or insert ip_conntrack_ftp into the existing IPTABLES_MODULES entry.  In the latter case, remember that module names are separated by a space: (eg) IPTABLES_MODULES="ip_conntrack_netbios_ns ip_conntrack_ftp"
  • service iptables restart

This solved my problems – hopefully it will do the same for you!


Tags:
Copyright Tyler Style 2015. All rights reserved.

Posted 2011-10-07 by Tyler in category "Linux

About the Author

Totally a geek engineer type – I like to think, tinker and make things go BOOM! I’m also pretty introspective, and enjoy analyzing most things around me and talk about them (often to exasperation). I don’t do much pop culture in general, and don’t own a TV – give me lively debate with another inquiring mind instead any day of the week!

Leave a Reply

Your email address will not be published. Required fields are marked *