File ctime/mtime update inconsistencies

Stefan (metze) Metzmacher metze at samba.org
Tue Jul 15 14:27:25 GMT 2008


Atte Peltomaki schrieb:
> Hello hackers,
> 
> Scenario: Delete older-than-x files on a domain member server CIFS 
> share.
> 
> Problem: neither ctime nor mtime attributes are consistently updated
> when new files are created or existing ones replaced. 
> 
> How things currently appear to work:
> 
> Using a WinXP SP2 client: 
> 
> Copy a file to a Win2003 R2 share: ctime is updated, mtime is not.
> Copy a file to a Samba 3.2.0 share: neither ctime or mtime are updated.
> 
> Using a Linux client, smbclient or smbfs/cifs mount:
> 
> Copy a file to a Win2003 R2 share: ctime and mtime both updated.
> Copy a file to a Samba 3.2.0 share: ctime and mtime both updated.
> 
> Would there be a problem changing Samba behaviour to match that of
> Win2003's?

The problem is that samba3 doesn't store the ctime and not filesystems
doesn't have a way to set the ctime.

We always return the mtime as change_time and last_write_time,
but only update the mtime to the last_write_time from the client.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20080715/770f0de8/signature.bin


More information about the samba-technical mailing list