Can't open certain files 'Document in use'

I attempted to open some of my documents and received this message: ‘Document file ‘XXX.odt’ is locked for editing by: Unknown User Open document read-only or open a copy of the document for editing.’

This problem seems to occur intermittently. I am unsure why. It seems not to occur on my android device, however it occurs on both my Lenovo Z570 and my other Lenovo machine which is a different model, both running the same version of Debian. I have tried closing Syncthing and powering off both of my other machines. I still cannot access the file.

Version Information

Syncthing Version: v0.14.18, Linux (64 bit) OS Version: Debian 8.6 Jessie

Syncthing does not use locking. It sounds like you have a stale lock file laying around.

1 Like

Or rather your document is open on some other machine, and syncthing syncs the lock files across. You should probably check what are the names of the lock files and add them to ignore list.

1 Like

Lock files for LibreOffice are usually .~lock.{filename.ext}#. On Windows they are without the . at the beginning iirc.

I would be careful ignoring lock files unless the connection between peers are transient or you don’t mind dealing with sync conflicts when multiple people edit files at once.


I don’t think this is the problem because I’ve never had an issue like this before installing Syncthing. I also do not use Syncthing for anything but my 2 personal computers and my phone. I turn off my other machines and the file still remains locked. I shut down Syncthing and the file is still locked. This only happens on the computers and not the phone.

Also, I am using Linux… so where should I look for lock files?

I found the file lock! It was a hidden file in the syncing folder. I deleted the lock and now I can use the file. What causes the file to lock? Will I still need to worry about syncing issues if I am working on the files alone?

Most likely the lock file came from another machine while you were working on it but syncthing didn’t get a chance to delete it once you were done.

1 Like

Is it likely that this will continue to happen every time now? I deleted the lock file, however now there is a new lock file and it is appearing on my phone, so this is not just happening with my linux computers anymore.

It depends on if you give your machines a chance to get in sync before shutting down the one that created the lock file.

If you are the only person using the share it should be pretty safe to add the lock files to the ignore list.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.