2

I'm trying to migrate a website from one server to another and I am having an FTP issue on the new server. The site has content pushed up to it by FTP by an in house piece of software, I know using FTP is wildly advised against but for the time being I have no choice in the matter. I have set up FTP apparently fine enough and can successfully transfer files using FileZilla, CyberDuck and ftp terminal clients but using our software it will login in, create the file of 0 bytes and time out (ETIMEDOUT) every time except when using the network at my office. I have ran this off 4G dongles, through VPNs, at home etc and it will fail.

The ftp client used in our software is jsftp, which only works in passive mode, so switching to active is not a possibility. The software runs on macOS.

The previous server works fine enough from any location, it is a MediaTemple shared Debian machine that used pure-ftpd. The new server I am migrating to is running Ubuntu 16.04 and hosted by Google Cloud Platform. I have used both vsftpd and pure-ftpd. I have tried using another Google Cloud server set up on my personal account and the same problems occur.

I can't figure out where the problem in this lies, the software works totally fine on the old server and when used in the office also works totally fine on the Google servers. The Google servers can also be accessed by numerous other clients and work regardless of being in the office or not. I can not find anything online about this specific situation so any ideas are welcome.

1
  • I think you need to check the FTP logs of the new server when the connection gives an error & it sounds like an FTP client level bug where there are incompatibilities between the client and the FTP service that the client tries to connect. Check the FTP vendor site for a newer version of the client software as the solution may be as simple as using the newer client on the newer server.See the comments from this post for potential workarounds if updating the client and confirming it's not a client incompatibility issue you can resolve that way perhaps: github.com/sergi/jsftp/issues/103. Jun 18, 2017 at 14:53

3 Answers 3

0

You mentioned that the file is 0 bytes and times out. Have you checked the file permissions of the directory your software is writing to?

0

I have fixed this issue server side. I noticed that on connections where I couldn't upload via the software if I used FileZilla that it would return with "Server sent passive reply with unroutable address. Using server address instead." but I wouldn't get this with connections where the software worked.

So I have set the server's IP address for passive mode (ForcePassiveIP in pure-ftpd) and now it works as intended.

0

When you bring up VM on GCP you should update firewall rules:

  • IN: TCP 20,21,60000-65535
  • OUT: TCP 20,21,60000-65535

Then update FTP to use passive port range 60000-65535. Then on clinet side use Passive mode. Details and instruction - http://sysadm.pp.ua/linux/proftpd-ubuntu-16-04.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .