I have an FTPS server on AWS Transfer which is inside a VPC with 2 subnets (with private and public IPs). I am trying to upload camera footages from a wireless camera to my FTPS server, but the server seems to be closing the connection after a short time. The specific commands that fail are the STOR and MLSD commands, after enetering Passive mode. There is a reply of 150, but thereafter the server timeouts and closes connection. I performed a FTP test using this service. The test results were all okay except for the MLSD command with the described issue above. The output is
Command: MLSD
Status: Data connection established, performing TLS handshake...
Reply: 150
Error: Reply too short. Expecting 3 digit reply code followed by space followed by description
This is the same error I get when I try a manual STOR or MLSD command from my end. The issue does not exist when I work with file clients such as FileZilla and seems to only arise in a CLI environment or with the camera's custom FTPS client app. I believe the current most likely situation is that the server is improperly handling the change into binary from the command line, and somehow the file clients are communicating in a way where that’s being circumvented.
What is causing this ?