[Samba] smbmount not obeying locks; it will not delete but will overwrite locked files.

eelco grakist eelco at ditismijnemail.nl
Tue Oct 4 20:10:17 GMT 2005


Hi all,

I have a problem with smbmount. I use smbmount to mount a tree from a
server (either windows xp or linux samba). Then I access the files in it
with the linux smbmount and with windows.

When I open a file (let's say document.doc) in windows with word this
file is sucessfully locked and I cannot overwrite it on another windows
computer.

But when I want to write-access this file with the linux client I can
overwrite it without problems. Though deleting is not possible...

example:
First I open document.doc with word on the windows machine.
Then I try to overwrite document.doc on a second windows machine. This
cannot be done offcourse.
Then I type to overwrite (echo xxx>document.doc) document.doc on a linux
machine (mounted through smbfs). To my surprise this could be done.

Why can the linux smb client overwrite files that cannot be overwritten
on a windows client?

ps> If I use a linux samba server instead of a windows xp server the
problem stays. So it's not a problem with the server.

Linux: Red Hat Enterprise Linux ES release 4 (Nahant Update 1)
Kernel: 2.6.9-11.EL
mount.smbfs: Version 3.0.10-1.4E

Regards,

Eelco Grakist
The Netherlands



More information about the samba mailing list