We export a share as readonly, but the filesystem itself is mounted read/write. When we copy a file in DOS from this readonly share to somewhere writable, the changetime of the original file is updated. This looks wrong to me. Systems used: - PCclient on PC-DOS 6.2 - Server: Sarge stable with self compiled samba-3.0.20 still running a 2.4.20-686 woody kernel. I solved this with the following patch: --- source/smbd/dosmode.c (original from samba 3.0.20) +++ source/smbd/dosmode.c (myversion - pached function: file_utime) @@ -448,6 +448,10 @@ SMB_STRUCT_STAT sbuf; int ret = -1; + /* Don't update the time on read-only shares */ + if (!CAN_WRITE(conn)) + return 0; + errno = 0; ZERO_STRUCT(sbuf);
Can you send me an ethereal trace showing this please ? I'm puzzled as to how it's getting to this function as the "NEED_WRITE" filter in smbd/process.c should be catching this before it gets this far. Jeremy.
Scratch that - I see how this can happen now. I've committed your fix - thanks very much ! Jeremy.
> Scratch that - I see how this can happen now. I've committed your fix - thanks > very much ! I don't understand, why it is necessarily to update the change time of the original file at all. Nothing is changed on the source. Or hs this something to do with the archive bit? der tom