We switched to to the AWS cloud with our local build machine. Now there is a batch file, which should upload a file via ftp. This worked fine locally, but not over the EC2 AWS machine.
C:\Programme\WinRAR\winrar a -afzip -IBCK -ep "Tool_%date:~-2%%date:~-7,2%%date:~-10,2%.zip" master
@echo Upload...
@echo open URL>ftp.txt
@echo USERNAME>>ftp.txt
@echo PASSWORD>>ftp.txt
@echo binary>>ftp.txt
@echo put TOOL_%date:~-2%%date:~-7,2%%date:~-10,2%.zip "/downloads/Tool%.zip">>ftp.txt
@echo quit>>ftp.txt
ftp -s:ftp.txt >out.txt
That does not work... I opened in the security groups settings: Inbound and Outbound ports 20-21, 1024-1048. It uploads the zip archive with 0 bytes.
The log file says:
ftp> open URL
Connection to URL was established.
220 FTP on server ready
200 UTF8 set to on
User (URL: (noone)):
331 Password required for USERNAME
230 user USERNAMElogged in
ftp> binary
200 type set to I
ftp> put Tool_180418.zip "/downloads/Tool_180418.zip"
200 PORT command successful
425 Unable to build data connection: The connection waiting time has expired
ftp> quit
221 goodbye.