THE INFORMATION IN THIS ARTICLE APPLIES TO:
- CuteFTP Pro, Home, and Lite, v8.x and earlier
SYMPTOM
Conserve Local File Time feature does not work properly when connected to Serv-u FTP Server
RESOLUTION
Turn off this feature when connecting to Serv-U or other FTP servers that modify the time sent as part of the MDTM set sequence.
MORE INFORMATION
The MDTM command is designed to be used for retrieving a file's time from the server. However, CuteFTP and various other FTP clients use the MDTM command to change (set) an uploaded file's time stamp. The standard documenting the MDTM command (http://www.ietf.org/rfc/rfc3659.txt) makes no provisions for using the MDTM command to set the file time stamp, so various clients and servers have implemented the command differently.
The typical command syntax is MDTM YYYYMMDDHHMMSS FILENAME, where the HHMMSS is either the client's actual local time zone or, in the case of some FTP clients, GMT (Greenwich Mean Time), which mimics the retrieve behavior of MDTM as documented in section 2.3 of the standard.
Certain servers, such as Serv-u, have extended the MDTM command even further, adding a time zone parameter to the end of the MDTM command, as follows:
MDTM YYYYMMDDHHMMSS[+-TZ] FILENAME
CuteFTP does not support this proprietary [+-TZ] parameter. Also, CuteFTP sends the local time for the HHMMSS portion of the MDTM command sequence, not the GMT time. Unfortunately, Serv-u (and potentially other FTP servers) expect the time to be sent in GMT and automatically adjust the time for the file, causing it to be different than what the client expected.
Example
CuteFTP retrieves a listing. File time shows 8:55 AM:
-rw-rw-rw- 1 user group 20249 May 14 08:55 Reports.cfc
CuteFTP does an MDTM retrieve time to determine what the remote file's time is. Notice the server sends 12:55 PM, adding 4 hours due to the server's time difference and GMT:
COMMAND:> MDTM Reports.cfc
213 20040514125501
CuteFTP uploads the replacement file:
STOR Reports.cfc
CuteFTP issues an MDTM command to set the time according the actual date and LOCAL time of the file, 12:55 PM:
COMMAND:> MDTM 20040514125501 Reports.cfc
Subsequently, CuteFTP retrieves the list from the server, with the time of 8:55 AM.
-rw-rw-rw- 1 user group 20249 May 14 08:55 Reports.cfc
Notice that the server did not write the time stamp as 12:55, as requested. Instead, it assumed the time stamp was in GMT and subtracted 4 hours.