Synchronize via FTP: Two Problems

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Bonobo Proboscis
Junior Member
Junior Member
Posts: 2
Joined: 2003-04-16, 02:37 UTC

Synchronize via FTP: Two Problems

Post by *Bonobo Proboscis »

A couple of problems while trying to synchronize via FTP:

The simple one: The time stamp on the server seems to always be set to :00 seconds for files created via FTP, while local files may not happen to have that stamp. Would be nice to tell the compare utility to Ignore Seconds... FWIW other similar programs have that ability.

The not so simple one: I was intrigued by the suggestion in the TC documentation that the time of a remote file created via FTP can not be set, because that did not seem right to me, so I tested that with WS_FTP LE and lo, the file on the remote server has a time stamp of the local file + offset.

So I'm not sure I understand the position that FTP cant set a time stamp on a remote file.

And while I am intrigued by the TC approach to synchronizing as it would present a directory with all files having a similar time stamp, I am worried that the approach would not be comparable in a world where a site might get updated in a variety of ways, not all the TC way.

Is there a way around this?

Can seconds (but not the rest of the date) be ignored for synch. purposes?

Thank You
-Bonobo
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The simple one: The time stamp on the server seems to always be set to :00 seconds for files created via FTP, while local files may not happen to have that stamp. Would be nice to tell the compare utility to Ignore Seconds... FWIW other similar programs have that ability.
No, this is a 'feature' of Unix file listings: Seconds aren't shown at all, and the time is only shown if the file is from the same year.
The not so simple one: I was intrigued by the suggestion in the TC documentation that the time of a remote file created via FTP can not be set, because that did not seem right to me, so I tested that with WS_FTP LE and lo, the file on the remote server has a time stamp of the local file + offset.
Can you check in the log file what command is sent to set the date? There is NO standard command to do this! The MDTM command which is used my some clients is defined only to retrieve the date, not to set it! So what does WS_FTP use?
Author of Total Commander
https://www.ghisler.com
Bonobo Proboscis
Junior Member
Junior Member
Posts: 2
Joined: 2003-04-16, 02:37 UTC

Post by *Bonobo Proboscis »

Copied from the log of a WS_FTP LE session:
STOR (a.file).html
150 Data connection accepted from (an.address); transfer starting.
Transmitted 205 bytes in 0.1 secs, (20.00 Kbps), transfer succeeded
226 Transfer completed.
MDTM 20030404052733 css2ref.html
250 Access and modification times changed.
PWD
So you are right, it is using MDTM to set the date. It seems to me that this must be a rather standard method, because most of the clients that I have manage to get the date set at the remote location.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It seems to me that this must be a rather standard method
Unfortunately it isn't - the MDTM command is only defined to retrieve the date, not to set it. The above command would retrieve the date for a file called "20030404052733 css2ref.html", so the above is clearly a violation of Internet RFCs. I haven't seen any server yet which supports this command - which one do you use?
Author of Total Commander
https://www.ghisler.com
User avatar
Hacker
Moderator
Moderator
Posts: 13065
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

It seems that some servers support this. http://www.southrivertech.com/support/titanftp/webhelp/mdtm.htm . Maybe it would be worth trying e.g. to retrieve the time of a file at login and trying to set it to the same time -> error - function not supported; no error - function suported.

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply