1

I'm a web developer and a few weeks ago I started to see a weird issue when uploading files to a server via FTP.

Some files, apparently randomly, are being uploaded as 0kb empty files. At first I thought my client's server was the issue, but it keeps happening with several other servers including my own which is pretty high end and has never had a similar issue.

If I re-upload the empty files, they are uploaded just fine, which leads me to believe it is an intermitent problem, but then if I overwrite the whole thing, some other different files are uploaded as blank. I've been manually looking for the 0kb files and replacing them individually but that's no fun when you have a 1,000 files CMS with lots of folders.

I've tried different FTP clients and it keeps happening. I thought my hard drive could be the problem so I tested using an external drive and uploading from there. Same problem.

Cyberduck returns a PASV 450 (action not taken) error.

I read it could be a network issue and followed the instructions to change the network's MTU to 1300 with no luck either.

I'm running OS X 10.8.2.

1

My recommendation would be to enable Logging on Cyberduck on Mac and then, since you also have your own FTP Server, enable logging on the FTP server.

When the problem occurs, make note of the exact filename and date/time of the error, then check both logfiles, client and server, to see if there is anything obvious.

If the server is returning a 400 level response from the PASV command, there could be a problem on the server generating an available data port to use for file transfer. It could be out of resources, or some other server limitation is being hit.

The strange part of this is the 0 byte file. If the PASV command is being issued prior to the STOR command, and it's returning a negative 400 level reply, the client should not be issuing a STOR to create the file, so you shouldn't see any file being created on the server. However, if there's a glitch in the client and it's sending a STOR filename before the PASV command, this could create a file on the server expecting a successful PASV exchange, and when it fails, their is left a 0 byte file on the server.

Looking in the Server log could show what's going on.

| improve this answer | |
0

Check if your system is set to use Passive Mode for FTP transfers.

In System Preferences go to Network → Advanced... → Proxies and make sure Use Passive FTP Mode (PASV) is ticked.

Briefly, the opposite of Passive Mode is Active Mode, where the server initiates a connection to the client. If the server is unable to open this connection (due to firewalls, NAT routing etc) then the file upload fails with error 450.

| improve this answer | |
  • I checked and passive mode is ticked, so it's not that. – BioXD Nov 14 '14 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.