Different behavior between Samba and Windows: ChangeTime

derrell at samba.org derrell at samba.org
Wed Apr 11 19:01:24 GMT 2007

In info level SMB_QUERY_FILE_BASIC_INFO, I notice that Samba3 returns a
ChangeTime equal to WriteTime.  WriteTime = mtime.

In Windows, the ChangeTime behaves very similarly to a POSIX ctime (which,
contrary to much popular belief, is not a creation time).  POSIX ctime and
Windows ChangeTime are both effected when the "status" of a file changes,
i.e. when its attributes are modified.  In POSIX, this means such things as
changing the mode of the file.  In Windows, this includes such things as
modifying the hidden or archive bits.

I have not studied the details of smbd enough to know if changing the
attribute bits of a file on the server just plays with mode bits or not.  If
that's the case, then instead of setting ChangeTime based on get_mtimespec(),
it should probably be based on get_ctimespec().



More information about the samba-technical mailing list