A fix for FTP MLSD connection timeout error

Published: November 22, 2013

Personally I can’t believe it. I never really thought I’d get to the bottom of this one. But it looks like setting up my own FTP server is what it took to find the fix.

So first, here’s the environment:

  • Linux FTP server - I haven’t tested yet with anything Windows based, but it seems to happen with all Linux based FTP servers.
  • FTP client Filezilla - Only tried with Filezilla so far.
  • Explicit FTP (FTPES) - Never had the problem with insecure FTP, but you shouldn’t be using that anyway.
  • Valid FTP user - you must be able to authenticate successfully.

And this is the error:


And now for the fix. You may need to adapt this depending on your Linux distro, FTP server, firewall, port ranges, or number of users.

echo "46700 46800" > /etc/pure-ftpd/conf/PassivePortRange  
ufw allow 46700:46800/tcp  
/etc/init.d/pure-ftpd-mysql restart

I hope this helps you