Issue 92686 - opening a file from a network volume twice does not make it write protected
Summary: opening a file from a network volume twice does not make it write protected
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: OOo 3.0 Beta 2
Hardware: Mac Mac OS X, all
: P3 Trivial with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2008-08-12 08:23 UTC by cvogelbusch
Modified: 2017-05-20 11:33 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description cvogelbusch 2008-08-12 08:23:24 UTC
This is a very critical issue since it causes data loss, but this bug reoccurs from time to time in all 
version of OpenOffice we had from OS/2 over Linux to NeoOffice, thankfully it was always quickly 

Open a file from a network volume.
Go to a different computer and open that file again.

Expected result:
The second user should get a write protected document.

Actual result:
The second user only gets a write protected document.

(I've discovered a "setting" for opening shared document write protected, but that only seemed to work 
on a per file basis.)

Since data loss is kind of a thing to prevent, OpenOffice should have the expected behaviour on a 
default basis and may be alow turning it off on a general or per file basis.
Comment 1 eric.bachard 2008-08-13 11:04:35 UTC
Comment 2 thorsten.martens 2008-08-13 12:34:26 UTC
TM->HRO: According to PL, file-locking should work on Mac as it works on other
UNIX systems. Please have a look. Thanks !
Comment 3 hennes.rohling 2008-08-13 16:07:35 UTC
> Expected result:
> The second user should get a write protected document.
> Actual result:
> The second user only gets a write protected document.

So where's the problem ? I guess this is a typo ;-)

But anyhow just tested it - it works as expected. The scond user can only open
the file readonly or can create a copy of the document.

We had several problems in the past with file system locking over several
network layers, because file locking does not always work across several layers
and OS.

But with OOo 3.0 the documents are marked locked by a side-by-side lock file. At
least with build OOO300m2 it works.
Comment 4 cvogelbusch 2008-08-14 16:15:15 UTC
Ups, yes that is a stupid type.

I tried it one Beta2 and M29.
When I open a document as a second user it is not write protected.

This even happens when I try to reproduce it on a local machine (e.g. by opening that file with 
NeoOffice and then with OpenOffice as well.)


Bt does not seem to have any effect.

(Please note that the bug seems to be not reproducable if the setting for shared documents was 
enabled for a document)
Comment 5 dgermann 2008-08-22 01:54:48 UTC

Not sure this is the correct place to jump in. Please direct me if not. Should I
perhaps post instead (or also) in issues 88476 and 85794?

I am having a similar issue in OOo 2.4.1. Have spent 6 or 8 hours fiddling with
Samba thinking my settings there incorrect, then was told it was a bug within
OOo because OOo is not getting fcntl byte range locks from a CIFS system. I do
not know what those words mean but am repeating what a Samba developer who works
on file locking told me.

In any event, this is a production environment, so data corruption is critical.

It seems that box1 can open a file in OOo 2.4.1.
Box2 can simultaneously open, edit and save that same file in OOo 2.4.1.
Box 3 can simultaneously open, edit, and save that same file in OOo 2.0.2.
However, WinXP (running OOo 2.0) cannot open that file while any of the others
have it open (Opens it as read-only).

Boxes 1, 2, & 3 are Ubuntu machines.

While we are waiting for OOo3, is there a work around? For instance, should I
downgrade all instances to 2.0?


:- Doug. Germann
Comment 6 dgermann 2008-08-22 15:38:16 UTC

I alerted one of the developers at samba to this issue and got this response:

"Unfortunately, [one poster] is not correct in these bug reports.

"He states : "It's not possible within OpenOffice because of file locking
accross multiple operating systems not being reliable."

"If OO did an fcntl lock to check if anyone else had the file open it
would work correctly across CIFS servers. It might not work when you're
mixing CIFS and NFS but that's an NFS issue, not a CIFS one. If you're
using pure CIFS this should just work (in fact we test the locking
by running the NFS connectathon tests on a CIFS mounted drive and
we pass them perfectly)."

Perhaps this will give a clue to resolving this serious issue.

:- Doug.
Comment 7 phil_ 2008-10-17 14:52:39 UTC
Could this be linked to ?
Comment 8 dgermann 2008-10-17 16:25:36 UTC
It might be the same issue. However that issue states it as a problem for
Windows versions.

This problem exists also in Linux versions (Ubuntu) and used across a Samba
network with Windows machines. The problem with this issue is that while Windows
and Linux seem to respect each other's locks, Linux to Linux does not.

:- Doug.
Comment 9 kai.sommerfeld 2009-06-16 10:20:15 UTC
mav: Something for you?
Comment 10 mikhail.voytenko 2009-06-16 10:28:44 UTC
Is the problem still reproducible in OOo3.1?
Comment 11 cvogelbusch 2009-06-16 16:31:57 UTC
Hi I am currently at my other workplace in california, I will test with when I am back home in Germany , 
second week of July
Comment 12 dgermann 2009-06-17 03:13:21 UTC

OOo 3.x seems to have resolved this issue for me under Ubuntu--it now has locks,
and even shows the locks in a directory listing in gnome with a

Thanks for this fix.

:- Doug.
Comment 13 Marcus 2017-05-20 11:33:28 UTC
Reset assigne to the default "".