Bug 66518 - Files locked on NFS. No lock file, no success moving or renaming
Summary: Files locked on NFS. No lock file, no success moving or renaming
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.2.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-02 18:39 UTC by head
Modified: 2015-09-21 14:12 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description head 2013-07-02 18:39:18 UTC
I am accessing two different files over NFS. One is a .xlsx, the other is a .ods. When I open them, I get the "Document in Use" dialogue, saying the file is locked by "Unknown User".

My permissions for the files are:
-rw-rw-rw- 1 nobody nogroup 14701 Sep 24  2012 file1.xlsx
-rw-rw-rw- 1 nobody nogroup 37421 Apr 12 12:07 file2.ods

There is no lock file in the directory containing the files, or in ~/.config/libreoffice.

I tried copying the files to the Desktop, renaming them, and moving them back to the NFS drive. Even with the new names the files were still locked for editing by Unknown User.

The NFS server is on a WesterDigital ShareSpace NAS using NTFS file system. The client is on Ubuntu 12.10 64-bit, with NFS v3 and linux 3.5.0-34-generic.
Comment 1 head 2013-07-03 18:00:08 UTC
I have upgraded to LO 4.0.4.2, deleted the folders ~/.libreoffice and ~/.config/libreoffice, and still have the same issue.

I also tried opening a copy, saving that copy to my desktop, deleting the remote copy and then doing a save-as to the remote location. In the save-as I get the following errors:

Error saving the document file2: Error during shared access to <location>/file2.ods.

A file is created in the remote location but it is 0-bytes.
Comment 2 Jared 2013-08-21 23:06:29 UTC
I am also receiving this issue.  I have a network drive shared (D-Link DNS-323 NAS device) and Windows 7 Clients have had trouble since LibreOffice 4.0

This is what I've found, there is a File Lock feature:
http://www.libreoffice.org/get-help/readme [search for "File Locking"]

These posts seem to be on track to adjust it, but not a perminent fix.
http://ask.libreoffice.org/en/question/4055/how-can-i-unlockwriter-documents-to-edit-on-another-computer/
http://ask.libreoffice.org/en/question/19290/how-to-unlock-file/

It works file for me on Mac OS X and Ubuntu.
Comment 3 head 2013-08-22 16:13:57 UTC
Hi Jared,
The only solution to this that I found was to add the "nolock" option to my fstab listing for my NFS drive.  The listing now reads (all on one line):

###.###.###.###:/nfs/Public /media/RemoteDrive nfs defaults,rsize=8192,wsize=8192,timeo=14,intr,nfsvers=3,nolock 0 0

This solved the problem for me as I'm the only person to access this NAS through NSF, all other users use FTP. It may be a issue if there are lots of concurrent NFS users, but I don't really know...
Comment 4 Jared 2013-08-22 18:45:41 UTC
Sounds good, but I have a Windows system I need to see this fix on--therefore no fstab file to adjust...
Comment 5 head 2013-08-22 18:47:41 UTC
I see. I've never used NFS on a Win system. Hopefully you can google your way to a solution...
Comment 6 Jared 2013-08-22 19:03:14 UTC
I use the SMB option to share files through this particular NAS.
I'll map the shared directory in Windows Explorer, and through Linux mount it with a fstab cifs line. But again, it's the Windows clients which have the trouble right now.
Comment 7 Maxim Monastirsky 2013-08-22 20:37:59 UTC
@Jared: Please take a look at Bug 67534. Would be great if you could comment there. Let's keep the current bug for NFS\Linux only. Thanks.
Comment 8 Jared 2013-08-23 23:01:38 UTC
(In reply to comment #7)
> @Jared: Please take a look at Bug 67534. Would be great if you could comment
> there. Let's keep the current bug for NFS\Linux only. Thanks.

Thank you, I'm taking my comments here:
https://bugs.freedesktop.org/show_bug.cgi?id=67885
Comment 9 Joel Madero 2013-11-16 03:03:47 UTC
I am unable to confirm this problem - closing as WFM

Ubuntu 13.04
LibreOffice 4.1.1.2 release

my fstab entry:
192.168.1.70:/media/LittleMan /media/LittleMan nfs defaults 0 0

permissions on the file:
-rw------- 1 joel joel  14338 Nov 15 18:59 LibreOffice Calc chart axis-1.ods

If you still face the issue with 4.1.1.2 or newer please set the bug to UNCONFIRMED and I'll try to find another person to find out what's going on. Because defaults for NFS seem to work for me, I'm tempted to say it's your environment and not LibreOffice but let us know if you're still facing this
Comment 10 delt 2015-09-12 02:13:50 UTC
Also having issues with loading/saving files to NFS volumes. Just filed the bug report:

https://bugs.documentfoundation.org/show_bug.cgi?id=94152
Comment 11 delt 2015-09-12 02:15:41 UTC
The bug report i just filed (linked in the above comment) might be marked as duplicate, so here's the info i wrote:
____________________

Trying to load a file on a NFS volume results in an error, where i am prompted to either edit the file read-only (which results in more errors) or edit a copy of the file.

Trying to save the file results in various errors, mostly involving locks on the file being saved.

In the following examples, my NFS server is running Linux Slackware 14.1 and is mounted from the client as /net/deimos - each client (a PC running Linux Mint and a guest OSX on the same machine under VirtualBox, using bridged networking) has a symlink 'deimos' in the home directory pointing to /net/deimos/home/user - so that ~/deimos points to the user's home account on the server.


Attempting to load a file on a NFS volume (linux mint client, linux slackware server) results in:

Document file 'test.ods' is locked for editing by:
Unknown User
Open document read-only or open a copy of the document for editing.


Attempting to load a file on a NFS volume (osx client, linux slackware server) seems to work fine.


Attempting to save to a file on a NFS volume (linux mint client, linux slackware server) results in:

Error saving the document Untitled1:
Error during shared access to /home/user/deimos/test.xls.


Attempting to save to a file on a NFS volume (osx client, linux slackware server) results in:

Error saving the document test.otd:
/net/deimos/home/user/temp/test.odt does not exist.


It is also worth noting that LibreOffice is the *ONLY* software which gives me this problem.
Comment 12 Maxim Monastirsky 2015-09-21 14:12:57 UTC
(In reply to delt from comment #11)
> The bug report i just filed (linked in the above comment) might be marked as
> duplicate, so here's the info i wrote:
So you reopened this bug just to say that another bug you opened _might_ be a duplicate?