File Modify Times Are Unexpectedly Changed

Urban Widmark urban at teststation.com
Wed Jan 2 15:09:16 GMT 2002


On Tue, 1 Jan 2002, David White wrote:

> Here is my problem: On the NT box, I create a file in the shared area.
> I then check its various file date values using the Explorer's
> properties dialog and write them down. Then I go to the Linux box and
> simply cat the file's contents. I then return to the NT box and again
> check the file's date properties. At this point, I find that both the
> accessed time and the modified time have changed from what was
> originally recorded. This seems strange to me as all that has been

This is a known problem. I believe the same thing has been reported as tar
complaints about modified files and the VC++ IDE warning about modified
files.

It is related to smbfs doing open+close on the file.

smbfs opens files for writing if it can. Always. It also tries to write
back its idea of mtime and atime when a file is closed. Neither should be
a problem, although the timestamp writeback looks strange ... (why not do
it only when something has changed?)


For some reason I am unable to reproduce the problem you describe (and the
"tar-test" also passes). win2k instead of NT and possibly a newer kernel,
but I don't know why it would work for me.

What kernel version are you running?

/Urban





More information about the samba mailing list