Samba 2.0.6, MKS' touch.exe, and file/dir time stamps
Gert-Jan Vons
vons at ocegr.fr
Wed Nov 17 13:10:46 GMT 1999
Hello all,
we are experiencing problems with samba 2.0.6 and the MKS touch command.
during our builds, we touch files and directories so that our make
dependencies work correctly. Unfortunately, it seems that MKS' touch.exe
doesn't actually change the time stamp of a file or directory. The
command returns without an error, but the timestamp does not change.
The same problem exists with samba 2.0.4 and 2.0.5, but we found out that
this actually _does_ work with an old machine that still runs samba
1.9.17p3.
Our clients are running NT4SP3 and NT4SP5, server is solaris 2.5.1. On
the samba side, there are no errors in the log files.
On the unix side, I have my file named "xx"
$ ls -lu # last access
-rwxr--r-- 1 vons users 0 Nov 17 10:18 xx
$ ls -lc # last inode modification
-rwxr--r-- 1 vons users 0 Nov 17 13:39 xx
Executing "f:\mksnt\touch.exe xx" on the client results in the following
log messages (debug level = 10):
| < .... the file is looked up and opened .... >
| [1999/11/17 13:39:45, 6] smbd/trans2.c:(1905)
| actime: Wed Nov 17 13:36:24 1999
| modtime: Wed Nov 17 10:18:01 1999
| size: 0 mode: 0
| [1999/11/17 13:39:45, 10] smbd/trans2.c:(1935)
| call_trans2setfilepathinfo: setting pending modtime to Wed Nov 17
10:18:01 1999
| < .... file is closed .... >
MKS' touch is supposedly updating the access and modification times of a
file, but after the "touch", only the Unix inode modification st_ctime is
updated (so samba *did* something with the inode), but not the atime or
mtime.
What surprises me is that the pending mod time is not the current time
(13:39), it looks as if the file's mod-time is overwritten with the same
old value ?) Secondly, the code states that the modtime is made pending
because a subsequent write() will change it anyway: but in our case, the
touch command is not going to write anything.
Am I running into a bug here, or is this a smb.conf problem ?
Gert-Jan
-----
"In creating this message no animals were hurt and no Microsoft
software was run" - broman at nosc.mil
More information about the samba
mailing list