Apache OpenOffice (AOO) Bugzilla – Issue 17211
[Samba] OOo 1.1 for Linux does not lock correctly documents on an smb shared folder
Last modified: 2010-06-18 10:13:23 UTC
The following tests have been performed on Mandrake Linux 9.1 with all official updates. I have added the following lines to the default smb.conf: /etc/samba/smb.conf ------------------- [...] [public] path = /home/samba public = yes writable = yes Then I have issued the following commands: [root@mandrake root]# mkdir /home/samba [root@mandrake root]# chmod 777 /home/samba [root@mandrake root]# service smb restart Then: network installation of OOo 1.1rc (./setup /net) in /usr/local/OpenOffice.org1.1rc/ , performed by the root; workstation installation of OOo 1.1rc performed by the "pratesi" and "foobar" users. The following two lines have been uncommented in /usr/local/OpenOffice.org1.1rc/program/soffice to enable file locking: SAL_ENABLE_FILE_LOCKING=1 export SAL_ENABLE_FILE_LOCKING Then I have issued the following commands: [pratesi@mandrake pratesi]$ mkdir SMBMOUNT [pratesi@mandrake pratesi]$ smbmount //localhost/public SMBMOUNT/ [foobar@mandrake foobar]$ mkdir SMBMOUNT [foobar@mandrake foobar]$ smbmount //localhost/public SMBMOUNT/ Then, the "pratesi" user runs ~/OpenOffice.org1.1rc/soffice and creates a new text document, then saves it as /home/pratesi/SMBMOUNT/test-1.1rc.sxw Now let us see which is the lock status: [root@mandrake root]# smbstatus Samba version 2.2.7a-security-rollup-fix Service uid gid pid machine ---------------------------------------------- public nobody nogroup 15975 mandrake (127.0.0.1) Mon Jul 21 23:26:05 2003 public nobody nogroup 15956 mandrake (127.0.0.1) Mon Jul 21 23:25:04 2003 Locked files: Pid DenyMode Access R/W Oplock Name -------------------------------------------------------------- 15975 DENY_NONE 0x3 RDWR NONE /home/samba/test-1.1rc.sxw Mon Jul 21 23:30:41 2003 ^^^^^^^^^ ^^^^^^^^^ The DenyMode is wrong: it should be "DENY_WRITE", to prevent the "foobar" user to overwrite it; instead, now the "foobar" user can open read/write /home/foobar/SMBMOUNT/test-1.1rc.sxw and then change it and *overwrite* it: [foobar@mandrake foobar]$ ~/OpenOffice.org1.1rc/soffice SMBMOUNT/test-1.1rc.sxw & After changes made by "foobar", "pratesi" reloads test-1.1rc.sxw and realizes that it has been changed by someone else :-( Now let us see which is the lock status: [root@mandrake root]# smbstatus Samba version 2.2.7a-security-rollup-fix Service uid gid pid machine ---------------------------------------------- public nobody nogroup 15975 mandrake (127.0.0.1) Mon Jul 21 23:26:05 2003 public nobody nogroup 15956 mandrake (127.0.0.1) Mon Jul 21 23:25:04 2003 Locked files: Pid DenyMode Access R/W Oplock Name -------------------------------------------------------------- 15975 DENY_NONE 0x3 RDWR NONE /home/samba/test-1.1rc.sxw Mon Jul 21 23:36:53 2003 15956 DENY_NONE 0x3 RDWR NONE /home/samba/test-1.1rc.sxw Mon Jul 21 23:35:38 2003 ^^^^^^^^^ ^^^^^^^^^ An analogous "no-lock" problem can be evidenced also if the shared folder is provided by a MS Windows box instead of a Samba server on Linux. On the contrary, no lock problems occur if the two clients run OOo 1.1 for MS Windows, both if the shared folder is provided by a MS Windows box and if it is provided by a Samba server on Linux. In the case of a Samba server on Linux, the DenyMode for a MS Windows client is "DENY_WRITE" instead of the above "DENY_NONE".
TM->HRO: Please have a look, thanks !
Reassigned.
See also discussion on openoffice.dev from 09.02.2004, Sebastian Hetze
*** Issue 25394 has been marked as a duplicate of this issue. ***
I have confirmed this issue on Gentoo Linux using OOo 1.1.2rc3, so the problem still exists. I modified the soffice shell script to enable file locking and received the same results as the submitter: The open file showed a DENIED_MODE of DENY_NONE on the samba server, and another user was able to modify the file at the same time.
Because of limited resources a deeper investigation and maybe a fix for this problem must be delayed.
I'd also like to see some way to lock documents locally that was also interchangeable independent of the means that the remote access use (smbfs, NFS, etc.). I guess that something like other editors do of prefixing the file with a "#" or suffixing it with a ".lock" extension would be great. with this, OpenOffice.org can take care of the lock by itself in all of the platforms it runs on and Windows can use the default locking provided by samba or its own filesystem (when it is serving the files) and this would prevent Word from doing nasty things while OpenOffice.org is running. I first ran into this problem while activating some LTSP stations that had to share files with Windows desktops... Now, the only solution to this problem is the one shown in http://www.hackinglinuxexposed.com/articles/20030623.html or using Samba to access local files as well (then we run into this ticket problem)... I'm running into this with Conectiva Linux 9 and Conectiva Linux 10. (OpenOffice.org 1.0.3 and OpenOffice.org 1.1.2). Thanks for your attention.
Reassigned for change of responsibilities sake.
Will this be addressed in 1.1.5 ? It is quite important.
I doubt this will ever get into 1.1 unless someone submits a patch. Test against OOo 2 beta snapshots and see if it is fixed there, and if not file a bug against version 2. Mike (Not a developer)
This is a duplicate of 67796.
mav: Please take over.
Is the problem still reproducible in OOo3.1?
There is no answer to my last question since one year. I have seen the scenario working in our configuration at least in OOo3.2. Closing the issue as working for me. Please reopen it if the problem is still there and there is a way to show that it lies in OOo implementation.
.