Ubuntu – Passive mode for vsftpd from Windows command-line FTP client

ftpUbuntuubuntu-14.04vsftpd

I have tried configuring vsftpd to work in passive mode, however, with no success. I have followed the instructions given in the answer for question How to configure vsftpd to work with passive mode and I have also followed this article where they explain how exactly to set up vsftpd and I did it on a clean installation of Ubuntu Server 14.04.3.

My iptables looks like this after invoking iptables --list:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             tcp dpts:40000:40100

I have tried restarting the vsftpd service and I have also restarted the server but no change.

I am able to login and browse/edit the files from the browser as well as in Windows Explorer, but when I try to connect to the server using ftp command using Windows command line, I log in and after issuing a command (such as ls), it says

200 PORT command successful. Consider using PASV.

and gets stuck there (because I have not enabled anything in the firewall so that's ok).

Is there any reason why my vsftpd is not behaving as in passive mode?

Thanks

Best Answer

Windows command-line FTP client does not support the passive mode. You cannot fix it by any server-side configuration.

If you need a scriptable Windows FTP client with a passive mode support, you have to use a different one.


For example my WinSCP FTP client supports scripting and defaults to a passive mode.

There's a guide available for converting Windows FTP script to WinSCP script.