We had the following issue:
Status: Resolving address of ftp.example.com Status: Connecting to 192.0.43.10:21... Status: Connection established, waiting for welcome message... Response: 220 Welcome to this FTP Server Command: USER our-username Response: 331 Please specify the password. Command: PASS ******* Response: 230 Login successful. Status: Connected Status: Retrieving directory listing... Command: PWD Response: 257 "/" Command: TYPE I Response: 200 Switching to Binary mode. Command: PASV Response: 227 Entering Passive Mode Command: LIST Error: Connection timed out Error: Failed to retrieve directory listing
the FTP server just would work in passive mode, and about every FTP-Client
we had was defaulting to Passive mode because we are behind a rooter and
obviously most ports aren't forwarded for security reasons.
What worked in the end was WGET
wget -m ftp://username:password@ftp.servername.com/foldername --no-passive-ftp
the -m option for wget means "mirror", so it mirror the folder structure on the server
(this is similar to -r but you don't have to specify which files using *
--no-passive-ftp sets wget to use only active connection