Date of received files using SFTP is wrong.

Advertisement

ysseo@lgcns.com
Joined:
Posts:
3
Location:
Seoul, Korea

Date of received files using SFTP is wrong.

When i receive files using SFTP, Modified and Accessed date is wrong as attachment.
Modified and Accessed date is displayed as ‎"Saturday, ‎December ‎30, ‎1899, ‏‎12:00:00 AM"
Created date is no problem.
The program version is WinSCP 5.9.2.
[/img]

Description: Wrong date

Wrong_Modified&Accessed_date.PNG

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,253
Location:
Prague, Czechia

Re: Date of received files using SFTP is wrong.

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. 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 can mark the attachment as private.

Reply with quote

ysseo@lgcns.com
Joined:
Posts:
3
Location:
Seoul, Korea

Re: Date of received files using SFTP is wrong.

I send the log message.
You can confirm a message "2016-09-23 21:36:37.922 Preserving timestamp [1899-12-30T09:00:00.000Z]".

. 2016-09-23 21:36:36.547 Binary transfer mode selected.
. 2016-09-23 21:36:36.547 Opening remote file.
> 2016-09-23 21:36:36.547 Type: SSH_FXP_OPEN, Size: 58, Number: 17923
< 2016-09-23 21:36:36.844 Type: SSH_FXP_STATUS, Size: 40, Number: 17668
. 2016-09-23 21:36:36.844 Discarding reserved response
< 2016-09-23 21:36:37.282 Type: SSH_FXP_HANDLE, Size: 33, Number: 17923
> 2016-09-23 21:36:37.282 Type: SSH_FXP_FSTAT, Size: 33, Number: 18184
< 2016-09-23 21:36:37.501 Type: SSH_FXP_ATTRS, Size: 9, Number: 18184
> 2016-09-23 21:36:37.501 Type: SSH_FXP_READ, Size: 45, Number: 18437
< 2016-09-23 21:36:37.922 Status code: 1
. 2016-09-23 21:36:37.922 3 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2016-09-23 21:36:37.922 Type: SSH_FXP_CLOSE, Size: 33, Number: 18948
. 2016-09-23 21:36:37.922 Preserving timestamp [1899-12-30T09:00:00.000Z]
. 2016-09-23 21:36:37.922 Transfer done: '<file name>'[684]
> 2016-09-23 21:36:37.922 Script: close
. 2016-09-23 21:36:37.922 Closing connection.
. 2016-09-23 21:36:37.922 Sending special code: 12
. 2016-09-23 21:36:37.922 Sent EOF message

Thank you

Reply with quote

ysseo@lgcns.com
Joined:
Posts:
3
Location:
Seoul, Korea

Re: Date of received files using SFTP is wrong.

Refer to attchment.
  • session_logging.log (56.72 KB, Private file)
Description: Debug 2

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Date of received files using SFTP is wrong.

Thanks for your log.
I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.

Reply with quote

jpantera
Joined:
Posts:
23
Location:
Los Angeles, CA

Re: Date of received files using SFTP is wrong.

martin wrote:

Thanks for your log.
I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.

Hello.

I have the exact same issue.
Files downloaded from sftp server all show a mod date of December 31, 1899, 12:00 am.

To download the files, I used winscp.com command-line (wrapped inside another program that builds & submits a script-file), and seeing your last reply, I'm looking for a way with this method to save a log file, which doesn't appear possible? (we work with a vendor who deletes the files from their ftp site as soon as we grab them, so on this transfer, I probably won't be able to grab more files with a .Net-Assembly transfer, and log file within a week or so).
Seeing your last response was to upgrade, the Winscp version on my server(s) is version 5.9.48. Today was first large-scale group of files downloaded, so perhaps it's running into the same issue.

Looking forward to your response.

- Joe P.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,253
Location:
Prague, Czechia

Re: Date of received files using SFTP is wrong.

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. 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 can mark the attachment as private.

Reply with quote

jpantera
Joined:
Posts:
23
Location:
Los Angeles, CA

Re: Date of received files using SFTP is wrong.

martin wrote:

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. 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 can mark the attachment as private.

Thanks, Martin.

Is /xmllog (or /log) something I can simply add as a command-line option to winscp.com call inside the script file (as part of the open, or an option, or ?)?

I see it can be set inside the preferences inside the GUI. If I set it there, for the Windows user that runs the winscp.com call, inside a Windows Task scheduler job, will it be used (how does it need to be set with winscp.com?)?

The documentation I read on your latest bug fixes / in-works items seemed to indicate (saw this date in the 12.0 beta referenced) seems to indicate this might be something specific to the type of data, maybe missing a mod date (although I do a file listing in the retrieve winscp.com file, before pulling th file, and mod dates are there..., I'm inquiring in order to understand how to ask my customer about, who is putting up the files for us to pull down)?

I will get a log, but may be delayed a few days / up to a week, but please indicate how best to turn it on (I dabbled with the .Net Framework method, and will probably eventually go there, with PowerShell, and turned on log that way, but my method here is winscp.com script file, wrapped inside a perl script).

On another note, your documentation is kind of weak with perl and the .Net Framework library (only one example, having to extrapolate), is there plans to expand there, or is there someplace else to look for that?

Thanks,
Joe P.

Reply with quote

Advertisement

jpantera
Joined:
Posts:
23
Location:
Los Angeles, CA

Re: Date of received files using SFTP is wrong.

martin wrote:

Use /log switch.
https://winscp.net/eng/docs/commandline

Regarding the Perl documentation:
What kind of documentation are you looking for? I believe that it's quite trivial to map any existing examples from other languages to Perl, once you understand the peculiarities covered in:
https://winscp.net/eng/docs/library_perl

Thanks, Martin.

Perl: The page you directed me to seems to have more detail than the one I first looked at (I'll continue to look at it, inquire here if questions).

Log: I have a log now, planning to upgrade to latest version first, but had question related to what am seeing in logs:

I do see these lines in the log on the system that has the mod-date issues:

. 2018-02-16 09:45:12.133 SFTP version 3 negotiated.
. 2018-02-16 09:45:12.133 Unknown server extension newline@vandyke.com="\n"
. 2018-02-16 09:45:12.133 We believe the server has signed timestamps bug

On a different server from same customer, pulling files doesn't get the weird mod dates, but rather defaults to the time the files were downloaded (I'd prefer "-preservetime", which will look at, on 5.13, although believe your documentation says that should be the default?), and the same log on that server indicates:

. 2018-02-22 11:30:12.691 SFTP version 4 negotiated.
. 2018-02-22 11:30:12.691 Server requests EOL sequence "\n".

One says SFTP version 3 negotiated, while the other says version 4 (same / similar sftp server, per customer).

Question on your versioning / available version... If I go to Winscp.net, the downloads page, the latest version I could download last week was version 5.11.3 (now, It appears that your version defaulted to download is 5.13). Last week, with 5.11.3 "latest available", i noticed that some people responding in this forum were saying they they had version 5.12.* ...

If we were to see a bug fix being worked on, in a newer version, is something we need (say the 5.13.1 or 5.14, showing as "not released yet"), how is that handled?

We normally don't just upgrade for the sake of upgrading as well (so trying to understand WinSCP policy).

Thanks,
Joe P.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,253
Location:
Prague, Czechia

Re: Date of received files using SFTP is wrong.

jpantera wrote:

Log: I have a log now, planning to upgrade to latest version first, but had question related to what am seeing in logs:
I do not see a question there. The server are obviously different or your session settings is different. I cannot tell what, unless you attach a log file. Consider attaching a comparable log file from the working server too.

If we were to see a bug fix being worked on, in a newer version, is something we need (say the 5.13.1 or 5.14, showing as "not released yet"), how is that handled?
I do not understand what you ask, sorry.

Reply with quote

jpantera
Joined:
Posts:
23
Location:
Los Angeles, CA

Re: Date of received files using SFTP is wrong.

martin wrote:

jpantera wrote:

Log: I have a log now, planning to upgrade to latest version first, but had question related to what am seeing in logs:
I do not see a question there. The server are obviously different or your session settings is different. I cannot tell what, unless you attach a log file. Consider attaching a comparable log file from the working server too.

If we were to see a bug fix being worked on, in a newer version, is something we need (say the 5.13.1 or 5.14, showing as "not released yet"), how is that handled?
I do not understand what you ask, sorry.

Thanks, Martin, & understand.

In Winscp's log file, what does this mean?

We believe the server has signed timestamps bug

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum