How to debug "File is locked" on Linux?

I keep my documents on a Synology NAS, and access them via SMB.

One of my clients, running Lubuntu 24.04 LTS with Libreoffice, is getting “File in use” messages when accessing an .odt file on the NAS. It’s running:

Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 8; OS: Linux 6.8; UI render: default; VCL: qt5 (cairo+xcb)
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 4:24.2.5-0ubuntu0.24.04.1
Calc: threaded

If I start a shell and cd to the share /run/user/1000/gvfs/smb-share:server=synology1.local,share=home,user=wegscd, I can create files just fine, so I don’t think I have a permissions problem, and the document I am trying to open is showing appropriate permissions.

I have no trouble accessing it R/W from Windows or from another machine that is running Ubuntu 23.04.4 LTS with 7.3.7.2.

Is there a way that I can increase a logging level to find out why this one instance will only open the file R/O?

look for a file that says ~filename.lock.odt and delete it.

It’s not there (I’m assuming I am looking in the same directory on the NAS as my document?)

More precisely:

.~lock.yourFileName.ods#

This file has the “hidden” attribute.

The lock file is not there. I opened another file on my Windows machine, and I can see the lock file for that one, so it does not look like it’s hidden from me…

If it were a lock file present, wouldn’t that prevent me from editing it from Windows or the Ubuntu 22.04?

does the problem persist after a restart of the session? after a reboot ?
for another user ?

Try creating a new file from the problematic computer, saving it in the problematic folder, closing it and opening it again.

Could be tdf#115747. If so, then version 5.4 (and 6.0.0) would work. On the other hand, it works for you from Ubuntu and 7.3… Likely I’m wrong.

There’s also tdf#59424 (specific to gvfs and Nautilus - but that’s with WebDAV).

problem is persistent.

It seems LibreOffice specific.

  1. I try to save remote, I click on the Windows share service I have set up, and nothing shows up.

  2. If I try to save to /run/user/1000/gvfs/smb-share:server=synology1.local,share=home,user=wegscd (which is what gets mounted by PcManQt [the file explorer with Lubuntu],

  3. From the shell, I can create files in /run/user/1000/gvfs/smb-share:server=synology1.local,share=home,user=wegscd just fine.

I can’t try another user, the share that it is on is private to one user. I can access from other PCs running different OS’ and version of LibreOffice.

The symptoms are very similar to 115747, and the comments in there about getting this error if the directory is not writeable, along with bullets 2 and 3 above, fit what I am seeing.

So why can’t Libreoffice write to that share when I can from everything else? How do we determine that (logging somewhere?)

Don’t know how to figure out the cause, but installing from the libreoffice PPA instead of the Ubuntu one resolved the “can’t open” issue (as well as the Windows share remote service in Libreoffice not working). I’ll file a bug with Ubuntu.

Please, for the reference, provide links to “libreoffice PPA” and “Ubuntu one”. I assumed that there is only one LibreOffice Packaging team PPA

The PPA I added was Index of /libreoffice/ppa/ubuntu (added via add-apt-repository ppa:libreoffice/ppa)

The “Ubuntu one” was not loaded from a separate PPA; I was referring to the libreoffice that was loaded as part of the Ubuntu install.