Word documents locked (read-only) on FUSE file system

Questions about Wine on Linux
Locked
sbitzer
Newbie
Newbie
Posts: 2
Joined: Fri May 22, 2015 10:13 am

Word documents locked (read-only) on FUSE file system

Post by sbitzer »

Dear all,

I have the following problem with Word 2010 under Wine: When I open a Word-document in Word, edit and save it, the document becomes read-only immediately. It appears that the save operation puts a lock on the file. Even after I close the document and Word, the lock is still there and I can only open the document in read-only mode. This is the same for (Wine-)Word and LibreOffice. This effect, however, is restricted to remote folders which I mount using sshfs, a FUSE module, i.e., there is no problem in local folders. I could not find hidden lock-files (at least not in the folder where the file is located) and file access permissions allow read and write for all users. Does anyone know what the problem could be?

Thanks a lot!

Linux: Linux Mint 17.1 Cinnamon 64-bit
Wine: wine-1.6.2
Word: Word 2010 with 32bit wine-prefix
SSHFS version 2.5
FUSE library version: 2.9.2
fusermount version: 2.9.2
using FUSE kernel interface version 7.19
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: Word documents locked (read-only) on FUSE file system

Post by dimesio »

You Wine version is old, so start by upgrading to the latest development release (currently 1.7.43).
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Re: Word documents locked (read-only) on FUSE file system

Post by oiaohm »

sbitzer a few things

Code: Select all

lsof FULL_FILENAME
Full file name including path in FULL_FILENAME position. /home/user/something.docx and kind of a idea. This is to see if any Application in fact still has the file open this will explain it locked.

Libreoffice native will also show the file as locked if Word failed to write the final bit of information into the file.

I guess using SSHFS with Libreoffice native you can create a word document and have it not locked. Now if Native Libreoffice creating a file over SSHFS results in a locked file we are not looking at a Wine issue.
sbitzer
Newbie
Newbie
Posts: 2
Joined: Fri May 22, 2015 10:13 am

Re: Word documents locked (read-only) on FUSE file system

Post by sbitzer »

Dear dimesio and oiaohm,

thanks for your replies. The problem persists with Wine version 1.7.38.

As you guessed, I can create a file using native LibreOffice without raising the issue. It just occurs once I save the file from within Wine/Word.

The output of lsof is, unfortunately, of no help. It shows the following:

[when document locktest.docx is open in Wine/Word]

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
wineserve 25823 user 363r REG 0,26 12981 8603 /path-to-sshfs/locktest.docx
WINWORD.E 25849 user 66r REG 0,26 12981 8603 /path-to-sshfs/locktest.docx

After closing the document the result of lsof is empty, as it should be. Yet, when I saved the document from within Word, the document remained read-only after closing the document (and Word).
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Re: Word documents locked (read-only) on FUSE file system

Post by oiaohm »

sbitzer MS Word does contain a few strange things that I remembered while I was sleeping.

https://discussions.apple.com/thread/5773237

This test sound stupid but it kinda required. Please try two things. 1 a touch command on the file to change the time stamps on the file. If that don't work try a rename. Both of these can be that word has left a file after saving and closing in the temp directory wine is using(not exactly a malfunction is a word/excel safe guard if it cannot complete all file operations). Yes this can happen under Windows just not very often. If either of these work around problem it is still showing some kind of bug. Problem is it still not sure if this is Wine or sshfs. Yes it could be that sshfs is not supporting ACL stuff word running in wine requires.

I guess its not the samba fault of the file in fact being permission read only because MS Office failed to change it back to read write.
https://lists.samba.org/archive/samba/2 ... 48984.html

There are many ways to confuse MS Word into doing stupid things. Yes multi mounting drives under Windows that is in fact supported by Windows also makes MS Word and Excel go nuts.
Locked