Search

GlobalSCAPE Knowledge Base

Files listed on remote server with a size of 0 KB

CuteFTP

THE INFORMATION IN THIS ARTICLE APPLIES TO:

  • CuteFTP Pro® (All versions)
  • CuteFTP Home (All versions)
  • CuteFTP Lite (All versions)

SYMPTOMS

After an unsuccessful upload attempt, files having a size of 0 KB are listed on the remote server.

DISCUSSION

When an FTP client such as CuteFTP attempts to upload a file using the FTP protocol, there are two commands issued: PASV, which asks the server to set up a listening socket on the server end (call this S), and STOR which tells the server the name of the file to be uploaded.

The client then attempts to make a socket connection to the server on the socket S established in the PASV command.  Most servers, when they get the STOR command, allocate a filename on the folder system into which the contents of the file will be placed as it is uploaded.  This allocation process creates a 0 KB file.  When the data socket is connected from the client to S, data arrives and is placed into this file.

However, if the FTP client is not able to make the socket connection to S, which might be because of firewall configuration, network routing problems, server-side being too busy to listen to port S, or the server giving a wrong port number to the client, and so on -- then the end result will be that the client will ultimately TIME OUT on the STOR command.  This means that the server will continue to have a 0 KB file reserved for incoming data since it has no real way of knowing when the client will do the data connection.

Some servers will maintain this file placeholder for a period of time (possibly until service restart), which locks the file.  Others will time out and release the lock but still keep the file placeholder on the filesystem.

The client software can retry the upload, which CuteFTP does.  Depending upon the server, this might or might not work.

Ultimately, the client is doing what it is designed to do.  It is the server that controls how to deal with files created for UPLOADS in which the Data Socket cannot be established.

Details
Last Modified: 12 Years Ago
Last Modified By: GlobalSCAPE 5
Type: PRB
Rated 2 stars based on 35 votes.
Article has been viewed 18K times.
Options
Also In This Category
Tags