Topic "Synchronization not preserving timestamp"

Author Message
baseliner

Guest


Hello - I'm trying to use the synchronize feature to synchronize two folders and noticed that the timestamp of the file on the target directory is set to the current timestamp instead of the timestamp on the source file.. so basically one ends up in an infinite loop since any time a synchronize is done, either the source or the target is always newer than the other. I have the Preserve Modification Time flag cheked and am using the "Both" directions transfer option. Is this a bug? Thanks.
Advertisements
prikryl
[View user's profile]
Site Admin
Joined: 10 Dec 2002
Posts: 18389
Location: Prague, Czech republic
What version of WinSCP are you using? What protocol are you using?
_________________
Martin Prikryl
Guest




prikryl wrote:
What version of WinSCP are you using? What protocol are you using?

Hi,
I'm not the original poster, but have the exact same problem.
I'm using command-line batch mode, protocol is FTP, version of WinSCP is 4.16
using the following: "synchronize remote localdir ftpdir -delete -mirror" the files on the FTP server always get a new time stamp.
Additionally, all files are uploaded to the FTP server, although identical. Even if this was because of the time stamp, it is newer on the FTP!
regards
prikryl
[View user's profile]
Site Admin
Joined: 10 Dec 2002
Posts: 18389
Location: Prague, Czech republic
This issue has been added to tracker.
_________________
Martin Prikryl
rmfii

Guest


We have encountered the same problem with v4.1.6. Even w/ "Preserve Timestamp" checked, the transferred file is given a Create Date = when the file is first starting to be written, and Modify Date = when the file is done writing.

Maybe related: the "Synchronize Timestamps" option on the Synchronize menu is disabled. (And given all the out-of-synch timestamps we have now, we could really use that feature!)

I humbly submit a big plug to get this fixed! Thank you.
-vh-

Guest


Just for info
At this moment we are facing problem with Winscp (versions: 382,406,419,423)facing the WS_FTP-SSH2 using SFTP protocol.

Version 3.8.2 - no any possible way to avoid error message after issuing MDTM command

Version 4.0.6 / 4.1.9.
- only those options does not cause the "error message" :
Code:

The server does not support the operation.
Error code: 8
Error message from server: SSHServerAPI.SFTP.fxp_attrs
Request code: 9

Winscp:options
preserve timestamp OFF
ignore permission errors OFF
set permission OFF

Version 4.2.3beta
- so far very same as for 4.0.6./4.1.9., so I am not sure if i missed some option in this new version or not.

I am gathering information from the server side, to get some relevant info about MFTM/MDTM options/restrictions set on server side. Coz I am little bit confused(see below part) by all those RFC specification and implementation by correspond developers of their pieces (winscp,filezilla,ws_ftp.....etc)

Anyway, is it possible to make MDTM/MFTM situation once for all clear?
Do we (winscp) following the RFC specification for FTP/SFTP protocol at matter MDTM/MFTM or not?
Will be there any option like "legacy mod" (when facing the old server using MDTM in old fashion way?).

Or maybe it will be great to have those options (preserve timestamp;ignore permission errors;set permission) optionable per session.

Regards
-vh-
prikryl
[View user's profile]
Site Admin
Joined: 10 Dec 2002
Posts: 18389
Location: Prague, Czech republic
-vh- wrote:
Anyway, is it possible to make MDTM/MFTM situation once for all clear?
Do we (winscp) following the RFC specification for FTP/SFTP protocol at matter MDTM/MFTM or not?
Will be there any option like "legacy mod" (when facing the old server using MDTM in old fashion way?).

MDTM/MFTM commands are for FTP protocol. So it is unrelated to the SFTP. So actually I'm not sure what you are after. If you server does not support setting permissions/timestamp, what can WinSCP do?

Quote:
Or maybe it will be great to have those options (preserve timestamp;ignore permission errors;set permission) optionable per session.

It can be configured per host using transfer settings presets.
_________________
Martin Prikryl
Guest




prikryl wrote:

MDTM/MFTM commands are for FTP protocol. So it is unrelated to the SFTP. So actually I'm not sure what you are after. If you server does not support setting permissions/timestamp, what can WinSCP do?


Actually, what I need is to know that MDTM command is used in proper way by WinSCP when the files are uploaded. I mean that the MDTM is not used to "change" but only to "retrieve" datetimestamp. For me, SFTP is just FTP covered in SSH tunnel so the commands are pretty same.

prikryl wrote:

-vh- wrote:
Or maybe it will be great to have those options (preserve timestamp;ignore permission errors;set permission) optionable per session.

It can be configured per host using transfer settings presets.


Thanks for pointing me to that option. This will help me. Smile I was not just happy to set it globally and TBO i missed this option. So far I used winscp with default setup. Very Happy

cheers
-vh-
-vh-

Guest


-vh- wrote:

Actually, what I need is to know that MDTM command is used in proper way by WinSCP when the files are uploaded. I mean that the MDTM is not used to "change" but only to "retrieve" datetimestamp. For me, SFTP is just FTP covered in SSH tunnel so the commands are pretty same.

Seems i have to RTFM, especially >> http://winscp.net/eng/docs/protocols
Anyway i just want to not to recieve any pop-ups with such error:
Code:

Error code: 8
Error message from server: SSHServerAPI.SFTP.fxp_attrs
Request code: 9


.... and actually I am looking to get some background information, about "what is the standard" if i have to make some changes in setup on client side rather than on server side. Due the SFTP procotl is still in "Draft4" is it not so clear for me. Some other clients/servers are facing very similar issues. At this moment i have option for my client (thanks to "transfer presets") and also prove that "ipswitch's WS_FTP" has option to "check/uncheck" "preserve time on upload".

cheers
-vh-
PS: thanks for your time and for WinSCP Smile
prikryl
[View user's profile]
Site Admin
Joined: 10 Dec 2002
Posts: 18389
Location: Prague, Czech republic
-vh- wrote:
.... and actually I am looking to get some background information, about "what is the standard" if i have to make some changes in setup on client side rather than on server side. Due the SFTP procotl is still in "Draft4" is it not so clear for me. Some other clients/servers are facing very similar issues. At this moment i have option for my client (thanks to "transfer presets") and also prove that "ipswitch's WS_FTP" has option to "check/uncheck" "preserve time on upload".

Sorry, I do not know how to help you. Obviously your server does not implement part of the SFTP functionality. You can avoid WinSCP using that functionality by option you already know. What more do you want?
_________________
Martin Prikryl
Guest




prikryl wrote:
Sorry, I do not know how to help you. Obviously your server does not implement part of the SFTP functionality. You can avoid WinSCP using that functionality by option you already know. What more do you want?


That's fine. I already know how to handle such event/error/pop-up at this moment. Also I am trying to force admin of that particular SFTP site to take look at it from server side. Seems that the problem is more related to their setup.

Cheers
-vh-
rlaw

Guest


prikryl wrote:
This issue has been added to tracker.


This tracker shows that Bug#293 has been fixed as of version 4.2, but I am using version 4.27 and still having timestamp problems. (The copied files have the current timestamp rather than the original timestamp of the source.)

I am running in batch mode, FTP protocol, WinSCP 4.27(build 758). Is there a special option I'm supposed to use for this? (I tried using -preservetime even though that is not actually an option for "synchronize" mode. Doesn't do anything, as expected)

Thanks for the help,
rlaw
prikryl
[View user's profile]
Site Admin
Joined: 10 Dec 2002
Posts: 18389
Location: Prague, Czech republic
rlaw wrote:
This tracker shows that Bug#293 has been fixed as of version 4.2, but I am using version 4.27 and still having timestamp problems. (The copied files have the current timestamp rather than the original timestamp of the source.)

Your server may not support the commands needed.

Please post a full log file showing the problem.

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. For posting extensive logs you may use pastebin or similar application. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.
_________________
Martin Prikryl
TC

Guest


I also saw a strange behavior with the time stamp during synchronize in the command line and also with the gui...!

First a small explanation..., we use WinSCP with the protocol SFTP with some users to have access to some shares. Everybody of this group has full access rights to this share and can update files there..!
If I update files to that share everything is okay when I have updated also the files before (no problem with the time stamp!).
But if somebody else copy files to that share and I will update with my account afterwards the time stamp is changing to the time when this action is done!
So it seems that WinSCP has a problem with this time stamp if more than one user is handling files...?!
We have chosen the option "Preserve timestamp" in the frontend and we (I and my colleagues) are using the version 4.2.7!

Any opinion..., is it a bug?!

Additionally I have a questions...!

Are there some further time stamp options available for "synchronize" in the command line as they are available for "get" (e.g. -preservetime)?

But I don't guess that it's only a problem of the command line, because I saw this issue also in the front end.

Thanks in advance for your answers and your help...!

Regards
TC
prikryl
[View user's profile]
Site Admin
Joined: 10 Dec 2002
Posts: 18389
Location: Prague, Czech republic
TC wrote:
If I update files to that share everything is okay when I have updated also the files before (no problem with the time stamp!).

Please post a full log file showing the problem.

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. For posting extensive logs you may use pastebin or similar application. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.
_________________
Martin Prikryl
TC

Guest


Hello!

As requested I've sent you an email with the required log file and additionally with some screen shots...!

Thanks in advance for your support!

Regards
TC
alpineman
[View user's profile]

Joined: 27 Mar 2013
Posts: 1
Location: Tirol/Austria
Maybe I am telling now something everybody knows, but maybe some helps the following information.
Feature request: it would be very nice if I could switch between using MFMT and MDTM to set timestamps because there are ftp-server like the default from IIS 7.5 which supports only MDTM to set timestamps.

I have winscp 5.1.4 portable and preserving of timestamps via FTP (i am talking only about ftp here) works if THE SERVER SUPPORTS the feature MFMT.
To check if the server supports one of the two Commands you have to enter the Command FEAT. Some Server say "Operation not permitted" some tell you a list with "advanced commands".

Thanks to the developer in investigating ressources in winscp!
Anil (from Austria)
prikryl
[View user's profile]
Site Admin
Joined: 10 Dec 2002
Posts: 18389
Location: Prague, Czech republic
alpineman wrote:
Feature request: it would be very nice if I could switch between using MFMT and MDTM to set timestamps because there are ftp-server like the default from IIS 7.5 which supports only MDTM to set timestamps.

MDTM reads, not sets, remote file timestamp.
http://tools.ietf.org/html/rfc3659#section-3

There are indeed FTP clients and servers that implement also setting timestamp using MDTM, but that's non-standard behaviour from times, when there was no support for setting timestamps using FTP.

But that's over 10 years ago (first MFMT draft is from 2002). So I do not see much sense implementing some non-standard functionality to support ancient servers. I'm sorry.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License