DesktopEditors icon indicating copy to clipboard operation
DesktopEditors copied to clipboard

Desktop Editors don't lock files for editing on samba shares, can corrupt files

Open IanHead opened this issue 1 year ago • 7 comments

This issue is unique.

  • [X] I have used the search tool and did not find an issue describing my bug.

Operating System

Linux (DEB package)

Version information

7.4.1.36 (flatpak)

Expected Behavior

When a file is open in OnlyOffice DEs, it should be locked and prevent other users from being able to make edits. Vice versa OnlyOffice should display a 'read only' warning when opening a file that is already open by another program/user. This is the case if working in local file system.

Actual Behavior

Other users/applications can freely open, save the file and make conflicting saves while OnlyOffice DEs is open. If you save again in OnlyOffice, mounted via Samba/gvfs, your edits will override theirs. If mounted at the kernel level via linux-cifs (using cifs-utils package), OnlyOffice can actually corrupt the document and destroy it.

Reproduction Steps

Ubuntu 23.04

  1. Mount a samba share with gvfs or cifs
  2. Open a file in OnlyOffice, make edits to it, save it, leave it open
  3. Attempt to open the same file as another user/application and make changes, then save

Additional information

See videos for two demonstrations of the issue:

Conflicting changes

https://github.com/ONLYOFFICE/DesktopEditors/assets/12196401/c8d3f1e2-df61-4818-af7c-c01700bf089c

File corruption

https://github.com/ONLYOFFICE/DesktopEditors/assets/12196401/ed60e53e-60ea-43e2-aa9d-3fd689da47d1

IanHead avatar Sep 08 '23 04:09 IanHead

Hello, @IanHead, thank you for report. I can confirm - this is bug in video 1, issue #46748.

Rita-Bubnova avatar Sep 11 '23 09:09 Rita-Bubnova

@IanHead I cannot repeat your case with an error when saving a file in LO on my Ubuntu 22.04 and Fedora 38 OS. Do you have any other systems other than Ubuntu 23.04? Can you check there?

XDmitryK avatar Sep 11 '23 16:09 XDmitryK

Hi @XDmitryK, I've been able to replicate the behaviour with Ubuntu 22.04 with the exact same results. In the first example, I am mounting the drive from nautilus using the smb://. In the second example, I have the shared drive set up in fstab using cifs, like this (some details redacted):

//192.168.0.1/Company /mnt/Company cifs username=*********,domain=***,password=*********,noauto,rw,users 0 0

And then I mount it on login using the commend:

mount.cifs //192.168.0.1/Company /mnt/Company

IanHead avatar Sep 11 '23 22:09 IanHead

@IanHead Thanks for the detailed answer. Another small clarification, are you using smb between two Linux OS?

XDmitryK avatar Sep 12 '23 12:09 XDmitryK

Thanks @XDmitryK for the follow-up. The other machine is running Windows Server 2012

IanHead avatar Sep 12 '23 21:09 IanHead

Congratulations on the 8.0 release! This issue seems to be resolved with the new version. Are you able to confirm?

IanHead avatar Feb 01 '24 20:02 IanHead