Samba 2.0.6, MKS' touch.exe, and file/dir time stamps

don_mccall at hp.com don_mccall at hp.com
Wed Nov 24 21:00:29 GMT 1999


Hi Peter, et. al;
I can reproduce this behavior with the standard NT 4.0 touch command (that you 
can pull from the NT 4.0 ResourceKit CD) from the command prompt if I map a 
network drive to my Samba 2.05b HP-UX 11.0 server.  But interestingly enough, I 
did a "touch *" in the directory in question, and ONE file DID reflect the new 
time, the other didn't.
Looking at the debug file for samba, I found the reason why:

[1999/11/24 15:04:49, 4] smbd/dosmode.c:(251)
  set_filetime(anothertestbydon.txt) failed: Not owner

Turns out that I was comming in as 'nobody'; I only had one file in the 
directory I was using to test your problem on, so I did a drag and drop copy of 
this file (anothertestbydon.txt) and it was called "Copy of 
anothertestbydon.txt".  Of course, since I had just CREATED this copy, 'nobody' 
owned it. the original file was owned by another user.  When I did a "touch *" 
the file I 'owned' changed timestamp, and the original one did not.
Perhaps your issue is related?  By the way, I took a netmon trace of the 
success and failure, and did not see where the reply to the SetFilePathInfo 
transact2 smb (which is the smb that the NT client sent to request the date 
change in response to the 'touch' command) in the failing case differed with 
the one that succeeded - neither returned any error information, which jives 
with your finding that the command comes back clean, even though the timestamp 
remains unchanged.
Try using smbstatus to see what username you are attached to, and what unix 
user that maps to, and then see whether changing the ownership on one of the 
files you are doing a touch on makes a difference...
Sorry I ran out of time to investigate if this is reasonable behavior, but I 
did a quick test by 'touching' a file on an NT 4.0 server share which I did not 
own, and the timestamp on THAT file did change...
Hope this helps,
Don



More information about the samba mailing list