When copying via FTP, the date is set to "today"
Moderators: white, Hacker, petermad, Stefan2
When copying via FTP, the date is set to "today"
Hi everyone,
when copying via FTP, all files get the current date. That should be able to switch off as synonymous with copying via F5.
A Bug?
Micha
when copying via FTP, all files get the current date. That should be able to switch off as synonymous with copying via F5.
A Bug?
Micha
For FTP also the copy direction matters. Downloading a file from FTP and keeping the date is an option alright. There's also a setting (in wcx_ftp.ini) to make it checked by default:
Regards
Dalai
However, uploading a file to FTP requires the server to support setting the timestamp of the file. It it doesn't support it, the file will get the current date/time. And there's nothing you can do about that, unless you're the administrator of the FTP server software.TC help, section 4.b) wrote:[default]
PreserveDates=0/1
Preserve file date/time on downloads
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
- ghisler(Author)
- Site Admin
- Posts: 48124
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
TC looks in the reply to the FEAT (and HELP SITE) commands whether the server supports one of the commands to send the time stamp:
MDTM, MFMT or SITE UTIME.
If your server supports one of these but does NOT report it, you can tell TC to use them anyway. You need to add one of the following values to wcx_ftp.ini, in the section of your connection:
SpecialFlags=4096
SpecialFlags=8192
SpecialFlags=12288
The first is for MDTM, the second for MFMT, and the last for SITE UTIME.
You will get an error if you set one of them but the server doesn't actually support the command.
MDTM, MFMT or SITE UTIME.
If your server supports one of these but does NOT report it, you can tell TC to use them anyway. You need to add one of the following values to wcx_ftp.ini, in the section of your connection:
SpecialFlags=4096
SpecialFlags=8192
SpecialFlags=12288
The first is for MDTM, the second for MFMT, and the last for SITE UTIME.
You will get an error if you set one of them but the server doesn't actually support the command.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Well, you should check whether any the commands used to set a timestamp is supported by your FTP server. You can see possible commands e.g. on this page. Take a look at the FTP log in TC (double click on the two lines of text shown above the panels while connected via FTP).
If your server doesn't announce support for any of these commands, you could take a look into the FTP server's settings; maybe it has an option that has something to do with setting timestamps of files. If you can't find anything, try searching for the FTP server name and any of the commands, e.g. "<synology-ftp-server-name> ftp mdtm" or something. There's also an old thread on the Synology forum, which doesn't look like you should keep your hopes up. I guess you should think about transferring files in a different way if timestamps are important...
[EDIT] Man, I'm slow today, but I'll leave the post as it is anyway. [/EDIT]
Regards
Dalai
If your server doesn't announce support for any of these commands, you could take a look into the FTP server's settings; maybe it has an option that has something to do with setting timestamps of files. If you can't find anything, try searching for the FTP server name and any of the commands, e.g. "<synology-ftp-server-name> ftp mdtm" or something. There's also an old thread on the Synology forum, which doesn't look like you should keep your hopes up. I guess you should think about transferring files in a different way if timestamps are important...
[EDIT] Man, I'm slow today, but I'll leave the post as it is anyway. [/EDIT]
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: When copying via FTP, the date is set to "today"
Christian, could you think about modify window - FTP: connection details ?
More user friendly is to choose method of time synchronization witch selection of: NONE, MDTM, MFMT or SITE UTIME
instead of modifying ini file with:
SpecialFlags=4096
SpecialFlags=8192
SpecialFlags=12288
Or even better is to implement all ways referred by Dalai in previous post.
Another issue relates to remote servers.
For its which don't use UTC it is necesary to corrects it.
Very useful can be possibility to use "Outgoing time shift" and "Incoming time shift" for file timestamps.
And also to have check box "Daylight saving".
Now the TC set timestamp always in UTC.
When server uses time zone -1:00 (or more) there it is not so big issue as when uses time zone +1:00 (or more).
In first case the time is "only" shifted.
In second case it is worse. The first 60 minutes (or multiples of hours) the server reports timestamp without time (only date is present) and TC show time 0:00. This is totally bad.
It can be nice to have button to "Autocheck time shift" which will to try to set way of timestamp method automatically.
I also found that checkbox SSL/TLS may not be sufficient. Some servers distinguish between implicit and explicit methods.
More user friendly is to choose method of time synchronization witch selection of: NONE, MDTM, MFMT or SITE UTIME
instead of modifying ini file with:
SpecialFlags=4096
SpecialFlags=8192
SpecialFlags=12288
Or even better is to implement all ways referred by Dalai in previous post.
Another issue relates to remote servers.
For its which don't use UTC it is necesary to corrects it.
Very useful can be possibility to use "Outgoing time shift" and "Incoming time shift" for file timestamps.
And also to have check box "Daylight saving".
Now the TC set timestamp always in UTC.
When server uses time zone -1:00 (or more) there it is not so big issue as when uses time zone +1:00 (or more).
In first case the time is "only" shifted.
In second case it is worse. The first 60 minutes (or multiples of hours) the server reports timestamp without time (only date is present) and TC show time 0:00. This is totally bad.
It can be nice to have button to "Autocheck time shift" which will to try to set way of timestamp method automatically.
I also found that checkbox SSL/TLS may not be sufficient. Some servers distinguish between implicit and explicit methods.
- ghisler(Author)
- Site Admin
- Posts: 48124
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: When copying via FTP, the date is set to "today"
Normally this isn't necessary because well written FTP servers report in the reply to the FEAT command when they support these commands.More user friendly is to choose method of time synchronization witch selection of: NONE, MDTM, MFMT or SITE UTIME
instead of modifying ini file
Currently this is only in the sync tool. Modern servers support the MLSD (machine list directory) command, which uses UTC by definition.Another issue relates to remote servers.
For its which don't use UTC it is necesary to corrects it.
Very useful can be possibility to use "Outgoing time shift" and "Incoming time shift" for file timestamps.
You can use prefix ftpis:// and ftpes:// instead of ftps.I also found that checkbox SSL/TLS may not be sufficient. Some servers distinguish between implicit and explicit methods.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: When copying via FTP, the date is set to "today"
Where is the trouble when FTP server identifying itself asNormally this isn't necessary because well written FTP servers report in the reply to the FEAT command when they support these commands.More user friendly is to choose method of time synchronization witch selection of: NONE, MDTM, MFMT or SITE UTIME
instead of modifying ini file
220 (vsFTPd 3.0.2)
and responds on FEAT command:
Code: Select all
211-Features:
AUTH TLS
EPRT
EPSV
MDTM
PASV
PBSZ
PROT
REST STREAM
SIZE
TVFS
UTF8
211 End
Related issue appears when I duplicate FTP connection. The SpecialFlag is not duplicated.
Thank you for hint. It helped.You can use prefix ftpis:// and ftpes:// instead of ftps.I also found that checkbox SSL/TLS may not be sufficient. Some servers distinguish between implicit and explicit methods.
Do you plan to add some kind tool for selection or at least this hint also in FTP connection menu?
- ghisler(Author)
- Site Admin
- Posts: 48124
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: When copying via FTP, the date is set to "today"
MDTM is the command to retrieve the file timestamp.
Servers need to report either
MDTM YYYYMMDDHHMMSS
or the newer
MFMT
for Total Commander to set the timestamp.
Servers need to report either
MDTM YYYYMMDDHHMMSS
or the newer
MFMT
for Total Commander to set the timestamp.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: When copying via FTP, the date is set to "today"
Unfortunately the vsFTPd (widely used) still doesn't support MLSD.
Only LIST command is available and I'm unable to persuade my provider to change ftp server.
But why TC doesn't shift received times (got by LIST command) from UTC to local time?
For example in case when one of corresponding SpecialFlags is set.
Or better using check box in FTP: connection details -> Advanced
Could you implement time shift (of received timestamps from UTC to local time) in some next release?
Only LIST command is available and I'm unable to persuade my provider to change ftp server.
But why TC doesn't shift received times (got by LIST command) from UTC to local time?
For example in case when one of corresponding SpecialFlags is set.
Or better using check box in FTP: connection details -> Advanced
Could you implement time shift (of received timestamps from UTC to local time) in some next release?