[Samba] samba does not lock files
Adam Tauno Williams
awilliam at whitemice.org
Mon Mar 27 04:03:39 GMT 2006
> The problem: Two users can have the same OOo file open at the same time, and
> both edit it. The last one to save the file wins!
> The system: 3 Ubuntu 5.10 client boxes and one WinXPPro client box, all running
> OOo 2.0; one server with RedHat 9.0 running samba version
I doubt this has anything to do with Samba. If you want to have proper
file locking you need to actually mount the CIFS filesystem; otherwise
you are most likely opening and saving the file via GNOME-VFS
(ldd /usr/lib/ooo-2.0/program/ucpgvfs1.uno.so | grep -i vfs). If your
using GNOME-VFS it works by getting the file to a temporary local file
and when you save it puts the file back to the server, like and FTP
GET/PUT; therefore there is no file lock and the last writer wins.
More information about the samba