-
baseliner
Guest
Synchronization not preserving timestamp
Advertisement
Advertisement
-
martin◆
Site Admin - Joined:
- Posts:
- 41,518
- Location:
- Prague, Czechia
Re: Synchronization not preserving timestamp
- Guest
Re: Synchronization not preserving timestamp
Hi,What version of WinSCP are you using? What protocol are you using?
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
-
martin◆
Site Admin
Re: Synchronization not preserving timestamp
-
rmfii
Guest
"Preserve Timestamp" doesn't work on Windows FTP
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.
Advertisement
-
-vh-
Guest
Winscp (MDTM vs MFTM .....)
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" :
The server does not support the operation. Error code: 8 Error message from server: SSHServerAPI.SFTP.fxp_attrs Request code: 9
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-
-
martin◆
Site Admin - Joined:
- Posts:
- 41,518
- Location:
- Prague, Czechia
Re: Winscp (MDTM vs MFTM .....)
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?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?).
It can be configured per host using transfer settings presets.Or maybe it will be great to have those options (preserve timestamp;ignore permission errors;set permission) optionable per session.
- Guest
Re: Winscp (MDTM vs MFTM .....)
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.
It can be configured per host using transfer settings presets.Or maybe it will be great to have those options (preserve timestamp;ignore permission errors;set permission) optionable per session.
Thanks for pointing me to that option. This will help me. :) I was not just happy to set it globally and TBO i missed this option. So far I used winscp with default setup. :D
cheers
-vh-
-
-vh-
Guest
Re: Winscp (MDTM vs MFTM .....)
Seems i have to RTFM, especially >> https://winscp.net/eng/docs/protocols
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.
Anyway i just want to not to recieve any pop-ups with such error:
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 :)
Advertisement
-
martin◆
Site Admin - Joined:
- Posts:
- 41,518
- Location:
- Prague, Czechia
Re: Winscp (MDTM vs MFTM .....)
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?.... 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".
- Guest
Re: Winscp (MDTM vs MFTM .....)
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
Re: Synchronization not preserving timestamp
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
-
martin◆
Site Admin - Joined:
- Posts:
- 41,518
- Location:
- Prague, Czechia
Re: Synchronization not preserving timestamp
Your server may not support the commands needed.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.)
Please post a full log file showing the problem.
Advertisement
-
TC
Guest
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
-
martin◆
Site Admin - Joined:
- Posts:
- 41,518
- Location:
- Prague, Czechia
Please post a full log file showing the problem.If I update files to that share everything is okay when I have updated also the files before (no problem with the time stamp!).
-
TC
Guest
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
- Joined:
- Posts:
- 1
- Location:
- Tirol/Austria
preserving of timestamps works if the server supports it
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)
Advertisement
-
martin◆
Site Admin - Joined:
- Posts:
- 41,518
- Location:
- Prague, Czechia
Re: preserving of timestamps works if the server supports it
MDTM reads, not sets, remote file timestamp.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.
https://datatracker.ietf.org/doc/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.
- tester.it
- Joined:
- Posts:
- 6
- Location:
- Italy
FTP sync and timestamp
i'm trying to sync/mirror a ftp folder tree to a local folder with the following configuration:
SW VERSION: WinSCP 5.17.7 Build 106.40.
PROTOCOL: FTP
METHOD: Powershell Script
SOURCE: Windows 2000 Professional, Ftp Server (IIS), UTC+1 timezone, DST.
DESTINATION: Windows Server 2012R2, Folder, UTC+1 timezone, DST.
but having timestamp problems on destination files.
readed faqs and tried several combination also with GUI but without success.
In attachment the job log, here powershell script used:
# Load WinSCP .NET assembly $WinSCPfolderRoot="C:\Program Files (x86)\WinSCP\" Add-Type -Path (Join-Path $WinSCPfolderRoot "WinSCPnet.dll") # Setup session options $sessionOptions = New-Object WinSCP.SessionOptions $sessionOptions.Protocol = [WinSCP.Protocol]::ftp $sessionOptions.HostName = "dad" $sessionOptions.UserName = "ftpuser_1" $sessionOptions.Password = "Password1" $session = New-Object WinSCP.Session # Log $session.SessionLogPath = "C:\MYPATH\MYFOLDER\backup.log" # Connect $session.Open($sessionOptions) # Synchronize Files $session.[WinSCP.TransferResumeSupportState]::On $transferOptions = New-Object WinSCP.TransferOptions $transferOptions.ResumeSupport.State = [WinSCP.TransferResumeSupportState]::On $synchronizationResult = $session.SynchronizeDirectories([WinSCP.SynchronizationMode]::Local,"C:\MYPATH\MYFOLDER\DATAFOLDERLOCAL", "/datafolderftp/", $True, $True, [WinSCP.SynchronizationCriteria]::Either, $transferOptions) $synchronizationResult.Check() # Disconnect, clean up $session.Dispose()
thanks.
-
martin◆
Site Admin
Re: FTP sync and timestamp
Sorry, that's too vague. What problems?but having timestamp problems on destination files.
- Guest
Re: FTP sync and timestamp
Advertisement
-
martin◆
Site Admin
Re: FTP sync and timestamp
Why should the timestaps match? Were they uploaded by WinSCP? Then we need log file that show the upload and consequent listing of the remote folder.
- tester.it
- Joined:
- Posts:
- 6
- Location:
- Italy
Re: FTP sync and timestamp
i made a small test enviroment and generated a complete log and new screenshot.
please see attachment.
You can see that every file "last modified" attribute on target has:
- seconds set to 00
- hours set to +1
-
martin◆
Site Admin
Re: FTP sync and timestamp
Sorry, but I do not understand. What does the screenshot show? What software is that? How is WinSCP involved?no upload, the need is only to download (mirror) an ftp to a local ntfs folder using winscp sync.
- tester.it
- Joined:
- Posts:
- 6
- Location:
- Italy
Advertisement
-
martin◆
Site Admin
-
martin◆
Site Admin
- tester.it
- Joined:
- Posts:
- 6
- Location:
- Italy
the target is the local smb server (local, destination of download)
in attachment site settings and window compare.
Advertisement
-
martin◆
Site Admin
For your old version, you will have to adjust the time zone offsets in session settings to compensate.
https://winscp.net/eng/docs/ui_login_environment
- tester.it
- Joined:
- Posts:
- 6
- Location:
- Italy
thanks.
how to apply offset to my powershell script ?
-
martin◆
Site Admin - Joined:
- Posts:
- 41,518
- Location:
- Prague, Czechia
Usehow to apply offset to my powershell script ?
TimeDifference
raw session settings:
https://winscp.net/eng/docs/rawsettings
Advertisement
You can post new topics in this forum