Apache OpenOffice (AOO) Bugzilla – Issue 25394
File locking from Windows to Linux does not work
Last modified: 2004-02-29 20:20:17 UTC
No matter how I configure Samba-3.0.2 on my Debian sarge Linux 2.4.21 system, I always can open the file with my OOo 1.1.0 (Linux) after this very file has been opened with OOo 1.1.0 on the NT4 SP6 workstation. Since I received no confirmation about anybody else having this type of inter-OS locking with OOo working, this might be simply not implemented. However, since I have at least one working configuration with above mentioned environment and M$ Word successfully locking files for OOo on Linux, I suggest further investigation on how Word gets these locks and possibly implementing this behavior with OOo on Windows. Here we go: Set up your Network such that you have a Samba server and an NT client. Additionally you might use a Linux client with OOo or you have OOo installed on the Linux server. Uncomment the SAL_ENABLE_FILE_LOCKING=1 stuff in the soffice script. Log into that NT workstation that you are about to replace with Linux some day in the future. Open OOo and create an new document. Save it on the group accessible Samba share with group write enabled and keep the document open. Next login with Linux as the same user or at least with file system write access for that file and open the same file localy or on an NFS mount. See: it opens with writing enabled. For this time, keep in unchanged and close the document on both Linux and Windows. Now open the file with OOo on the Linux side first and then try to open this very file with OOo on your NT workstation. See: opening the file on the NT side fails with some misleading error message (my german localized Version says: "Die Datei liegt in einem falschen Format vor") This happens no matter how I configure Samba. Now take a look at this: Configure your samba that OPLOCKS are completely disabled, i.e. make kernel oplocks = No oplocks = No level2 oplocks = No Dont forget to restart samba after changing the conf. Open your so much hated old Word97 and create a new document, save it on the samba share right next to the OOo document. Just for fun, look at the output of smbstatus -LB and see: Locked files: Pid DenyMode Access R/W Oplock Name -------------------------------------------------------------- 4992 DENY_NONE 0x2019f RDWR NONE /home/grp1/~WRL0001.tmp 4992 DENY_NONE 0x2019f RDWR NONE /home/grp1/TestDokument2.doc Byte range locks: Pid dev:inode R/W start size ------------------------------------------------ 4992 00301:420efcb W 2147483539 1 4992 00301:420efcb W 2147483559 1 4992 00301:420efcb W 2147483599 1 4992 00301:420efcf W 2147483539 1 4992 00301:420efcf W 2147483559 1 4992 00301:420efcf W 2147483599 1 Now open this Word document with OOo both on the Linux and the Windows side and see: The document is opened read-only both on Windows and on Linux. So, unless we get OOo on Windows lock files for OOo on Linux the smooth migration path does not work. It might appear that someone has to use M$ Word on Windows and has to replace both the office and the OS later at the same time. Not exactly what we would like to do... Any help is appreciated!
TM->HRO: Please have a look, thanks.
Reassigned.
Reassigned again.
Duplicate *** This issue has been marked as a duplicate of 17211 ***
closed