SMB_SET_FILE_BASIC_INFO
Jeremy Allison
jallison at cthulhu.engr.sgi.com
Thu Oct 7 00:51:31 GMT 1999
Michael C. Adler wrote:
>
> I apologize if this has been hashed out before. I looked in the
> archives and didn't find anything.
>
> I've been trying to get robocopy to work from an NT filesystem, copying
> to a Unix filesystem using Samba. I finally figured out why it doesn't
> work.
>
> In trans2.c/call_trans2setfilepathinfo(), the code that handles the
> SMB_SET_FILE_BASIC_INFO case takes the MAX of the write time and the
> changed time. I believe Microsoft actually uses the changed (creation)
> time as the changed time of the file for the purposes of backups. The
> write time is the last time the contents were changed.
>
> robocopy depends on being able to set the last write time. If it fails,
> it doesn't know what to do the next time it is run. Samba is forcing
> the time to be the latter of the write time and the creation time.
> Unfortunately, if a file is copied to a new location on NTFS, the write
> time is kept old and the creation time is set new. This means that it
> is very easy to get a file in a state on NTFS such that copying it to a
> Samba server will set a relatively new modtime even thought the write
> time on NTFS is old.
>
> As an experiment, I changed the modtime computation in
> call_trans2setfilepathinfo to use only pdata+16 (write time) and ignore
> changed time (pdata+24) when handling SMB_SET_FILE_BASIC_INFO. I think
> this works for me and may be what others want. I doubt it works for
> everyone. Does it deserve a mode in smb.conf?
Can you send me the diffs for this patch please ? I'd like to
understand exactly what is being done here.
Cheers,
Jeremy Allison,
Samba Team.
--
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------
More information about the samba-technical
mailing list