I’ve practically spent the whole day trying to resolve the issue of not being able to access to my FTP server with Filezilla. Each time I tried to login, Filezilla hangs at the command that says MLSD and unable to proceed further. Actually, I’ve already login but just that the server refused to list the remote directory.

Contacted support at the hosting company and they tried every ways they could to get it resolved but to no avail. All we knew was that it could be due to some firewall issues in the server.

Previously it was working perfectly until my VPS was migrated to a new server and that was when the FTP issue cropped up. Finally, I’ve got no choice left but to access the server via SSH myself to check on the configuration files. What I’ve found out was that the PassivePortRange has been commented out from the file pure-ftpd.conf. So I just removed that comment and the FTP starts to flow again perfectly.

In case if you’re faced with  similar problems of not being able to access your server as it hangs at the MLSD stage, this is what I’ve done:

  1. Login to the server using SSH as root user
  2. Open the file /etc/pure-ftpd.conf
  3. Scroll down and look for the line that says “PassivePortRange 30000 35000″
  4. Make sure it is not commented out (with a # at the front)
  5. Save the file
  6. Restart the FTP server

And it should work now!

usin/etc/pure-ftpd.conf

Tags: , , , , , , , ,

9 Responses to “FTP Server hangs at MLSD command when accessing with Filezilla”

  1. Zack Goutham says:

    Hi,

    If you are not behind a router and are directly connected to the internet, you should try uninstalling firewalls installed on your computer. I had two extra firewalls installed on my PC when I started having the same problem. I guess it’s PC tools which blocked file transfer. PC tools’ free firewall seems to have a basic filtering rule for all applications. Using a smart firewall would solve the problem if you are having the same problem.

  2. Bill says:

    Yea I am having the smae issues with MLSD. I can get into the FTP using a VPN but it may still hang and I ahve to refresh it over and over. I am wondering if this some router issue but my router page is all in Chinese (I live in China) and so I am lost, all I can do is reboot.

    I am assuming you mean to get into your server via some like Cpanel?

    I can get into my FTP for now and I will look for that file in /etc/ and see what it looks like.

  3. monee says:

    When using Verizon MIFI, I have this problem with only one of my accounts – the rest of my accounts all work just fine so I am thinking it is a server setting for that one account. It will not let DW connect either BUT everything works fine when I reconnect with my original ISP instead of MIFI. Oh, and I can connect with CPanel.

  4. Trev says:

    Quick addon to the fix.

    Just battled with this and the above was part of the fix, but if it doesn’t work you might need to open a hole in your firewall to allow the extra ports to work.

    If you’ve got the APF firewall installed then do the following to open up the ports and it should hopefully start working:

    – Do pico -w /etc/apf/conf.apf
    (The -w turns off word wrapping which is important)

    – Find the line starting IG_TCP_CPORTS=

    – At the end of this line we need to add the port numbers from the PassivePortRange so that we open up the firewall, eg:

    IG_TCP_CPORTS=”21,30,55,30000_50000″

    – Finally restart the APF firewall with:
    /etc/init.d/apf restart

    Hopefully that’ll help someone else who ran into the same problems as me.

  5. Alvin Cheong says:

    Trev,
    Thanks for the quick addon to the fix.

    Rgds,
    Alvin.

  6. Peter says:

    Thanks, fast fix!

  7. raymond says:

    Set FileZilla Client Transfer Settings to Active. Should be under site manager. No need make changes to firewalls. They are there for a reason.

  8. Dan says:

    Hi there,

    I just changed the FileZilla TRANSFER MODE to ACTIVE and not PASSIVE(RECOMMENDED) and it solved the issue without having to make changes at the server side.

    In lot’s of cases configuring the FTP server isn’t an option (for example on a locked down NAS or people using shared hosting).

    Just try the above, worked for me :)

  9. ibeleave says:

    Thank you raymond! just saved me some hair pulling! My FileZilla settings were for “auto” – changed to “active” and good to go. I too just changed from vps to smartvps – old settings worked on the earlier server, not on the new one.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>