Marc SCHAEFER
2006-Sep-18 22:45 UTC
[Samba] Cases where Samba modifies a file without changing the timestamp?
Hi, apart from the mmap(2)ed DBM files that Samba uses, are they any cases where Samba will *modify* data files without setting the mtime ? I have issues with rsync not seeing changes to Samba exported files (md5sum don't match). The mtime is however in the very distant past (say 2004), but the content seems to have changed. I don't think it's a data integrity issue. Any idea ?
Logan Shaw
2006-Sep-18 23:14 UTC
[Samba] Cases where Samba modifies a file without changing the timestamp?
On Tue, 19 Sep 2006, Marc SCHAEFER wrote:> apart from the mmap(2)ed DBM files that Samba uses, are they any cases > where Samba will *modify* data files without setting the mtime ? > > I have issues with rsync not seeing changes to Samba exported files > (md5sum don't match). The mtime is however in the very distant past (say > 2004), but the content seems to have changed.Let me guess: these files' names end in the string ".XLS", right?>From what I've heard, apparently MS, in their infinite wisdom,decided it would be neat if Excel wrote things into files and then set their modification time back to what it was before modifying the files. To me, the intent behind "modification time" seems fairly obvious, but apparently some bright person at MS has a different interpretation[1]. I'm not sure if MS has any documentation about this phenomenon, but the Unison folks do mention it in a changelog[2]: + Excel files are now handled specially, so that the fastcheck optimization is skipped even if the fastcheck flag is set. (Excel does some naughty things with modtimes, making this optimization unreliable and leading to failures during change propagation.) - Logan [1] My guess is that Excel writes lock information into the document's file, and the MS person decided that "modification time" should be interpreted to apply to the conceptual document rather than the file, but that's just a guess. Or maybe they were somehow forced into it because of http://support.microsoft.com/kb/324491/ . [2] at https://svn.cis.upenn.edu/svnroot/unison/trunk/src/NEWS .