WebDAV mtime incorrect

Advertisement

abakker
Joined:
Posts:
12

WebDAV mtime incorrect

WinSCP 5.19.4 on Windows 10, connect to WebDAV service through SFTP. Everything seems fine, except that the mtime of some files is not correct. Logout/login, clear cache or refresh makes no difference, WinSCP keeps on displaying the wrong changed time for some files. Seems WinSCP caches the time somewhere, but does not clear/refresh it?
In one case I had a file with date 26-10-2021, the file got replaced with a version with date 25-10-2021, but WinSCP keeps on showing 26-10-2021. When I mount the WebDAV drive on my Ubuntu server both ls -l and stat correctly show 25-10-2021. Seems WebDAV is working ok therefore and this is a WinSCP issue?

Reply with quote

Advertisement

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

Re: WebDAV mtime incorrect

If you connect with SFTP in WinSCP, what does your problem have to do with WebDAV? You cannot connect to WebDAV server using SFTP. Though your "file server" might support both WebDAV and SFTP. Maybe the SFTP API is broken. Why do you connect using SFTP, when WinSCP supports WebDAV and WebDAV seems to work correctly?

If you connect using any other client the same way as with WinSCP (i.e. using SFTP???), what times does it display? 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

abakker
Joined:
Posts:
12

Sorry about the confusion. It is a file server which is meant to be used with WebDAV. Connecting through WebDAV with WinSCP does not work (I get a 405 not allowed error), but SFTP does work. I downloaded and installed FileZilla, and FileZilla has the same problem. Attached also the log from WinSCP, check for the file tags.log, WinSCP gets 2021-10-26, but it should be 2021-10-25. I thought WinSCP somehow got an old date from a cache, but it now seems that SFTP is returning an old date and it is a problem with the file server. If I mount the file server through WebDAV in my Linux server it gives the correct date, strange. I have reported the issue to the file server company, hopefully they can figure out what is going on.

Reply with quote

martin
Site Admin
martin avatar

abakker wrote:

I get a 405 not allowed error.
You probably need to login directly to the WebDAV-enabled folder (not to the server's root).

Reply with quote

abakker
Joined:
Posts:
12

It seems that WebDAV caching causes the problems, the mdate of files changes when WebDAV synchronizes. For example rsync -a updates the mtime to the date/time of the files it copies, but when WebDAV synchronizes it gives the files the current date/time overwriting the mtime that rsync set. The next time rsync copies everything again as a result because the mtimes are different.
It seems that WebDAV shows the date/time you set from its cache, even though it already synchronized and changed the date/time in the file system to the current date/time. This put me on the wrong foot: WebDAV showed what should be the correct date/time, but WinSCP showed the current date/time it had been set to in the meantime. After an umount/mount WebDAV also shows the current date/time WinSCP was already showing.

Reply with quote

Advertisement

You can post new topics in this forum