cryptomator
cryptomator copied to clipboard
File Corruption with Microsoft Office and Dropbox
Please agree to the following
- [X] I have searched existing issues for duplicates
- [X] I agree to follow this project's Code of Conduct
Summary
The original file is deleted and replaced by one or more .tmp files
What software is involved?
- Operating System: Windows 11 Pro 22H2 22621.2283
- Cryptomator: 1.10.0
- Microsoft 365 MSO (Version 2308 Build 16.0.16731.20182) 64 bits
- Dropbox v 182.4.6427
Volume Type
WinFsp / WinFsp (Local Drive)
Steps to Reproduce
- Open a file with Microsoft Word or Excel
- Modify it then click on save
Expected Behavior
Save file changes without corruption
Actual Behavior
Error is displayed. Original file is deleted and replaced by a file of type 1234ABCD.tmp
Reproducibility
Random
Relevant Log Output
No response
Anything else?

Without dropbox it works fine.
I cannot reproduce this with Microsoft 365 (MSO (Version 2302 Build 16.0.16130.20186) 64 Bit) and files-online-only turned off.
@QriMi Are you using Dropbbox files-online-only feature?
@infeo No I don't use the Dropbbox files-online-only feature. I just tried it with Microsoft 365 MSO (Version 2302 Build 16.0.16130.20186) 64 Bits and the bug is still present but behaves differently on this version :
- Open a .xlsx file with Microsoft Excel
- Click several times on save (with or without modification)
Result : creation of one or more .tmp files with or without Error.
Also impossible to create and save a new document in either Excel or Word.
Only on WinFsp / WinFsp (Local Drive) apparently.
@QriMi We released Cryptomator 1.7.3 this week which contains an important fix for reading content from the vault. Is this issue still reproducable?
@infeo Yes, the problem is always present in WinFsp / WinFsp (Local Drive) only, i have updated the post.
@QriMi When you open a Windows cmd shell and enter
wmic useraccount where name='%username%' get sid`
does the output start with S-1-12-1-... ?
@infeo No, start with S-1-5-21-...
@QriMi you closed the issue, is this solved for you?
@hpvd no sorry
Without dropbox it works fine.
does it "always" works fine with dropbox and without cryptomator (storing directly in a subfolder of dropbox, without encryption)?
Background: I see a somehow similar, not identical problem from time to time too - but when not using cryptomator with dropbox, but old boxcryptor classic with dropbox, and I was thinking about moving to cryptomator... (which I'm already using for non-daily- working directories)
No problem with Microsoft Office and Dropbox only. The problem seems to occur because Microsoft Office creates a temporary file when editing a document, a temporary solution is to edit your documents with another software or to disable Dropbox synchronization and manually synchronize later.
Same behavior for me since I upgraded to Cryptomator 1.73 and WinFSP 2023 2.0.23075. I killed an existing Excel Macro file after I tried to save changes, which was denied with an error message. I closed Excel and lost the whole file and was only able to recover it with the help of Dropbox file history, so this is a very critical bug!
Then I tried to save a new Excel or Word file to the vault, which doesn't work anymore at all.
@DavidUniUlm Cryptomator only supports the WinFsp version, which is shipped with the EXE installer. For 1.7.3 it ist WinFsp 2022 1.12.22339.
@QriMi Thanks for the output. WinFsp also ships with a tool to determine the used userid. Can you open a terminal, execute the following command and report the output?
C:\Users\JimDonut>"C:\Program Files (x86)\WinFsp\bin\fsptool-x64.exe" id
Output on my machine is
User=S-1-5-21-1806044646-....(MyComputer\JimDonut) (uid=197613)
Owner=S-1-5-21-1806044646-...(MyComputer\JimDonut) (uid=197613)
Group=S-1-5-21-1806044646-...(MyComputer\JimDonut) (gid=197121)
``
@infeo
User=S-1-5-21-501063397-....(DESKTOP\Qrimi) (uid=197609)
Owner=S-1-5-21-501063397-...(DESKTOP\Qrimi) (uid=197609)
Group=S-1-5-21-501063397-...(DESKTOP\Aucun) (gid=197121)
I just upgraded from WinFsp 2022 1.12.22339 to see if anything changed. Switched back and nothing changed.
Output for me is
User=S-1-5-21-2576235843-....(DESKTOP-5600X\David) (uid=197609)
Owner=S-1-5-21-2576235843-....(DESKTOP-5600X\David) (uid=197609)
Group=S-1-5-21-2576235843-....(DESKTOP-5600X\Kein) (gid=197121)
Thanks for the feedback.
Modifying and saving the changes in a rapid sequences triggered the bug also on my test device. I don't believe anymore, that this is related to permissions. Need to investigate further.
Yes i am facing same issue. It i save excel file rapidly twice. Issue always appear and easily reproduce-able.
Can you outline the steps you do to force the corruption with Excel? I've tried Cryptomator 1.9.3 and can't force any corruption by saving quickly.
CM: v1.9.3 OS: Windows 11 Office: 2019 Mount: WinFSP (Local)
@a-528 Thanks for mentioning it. We have a different ticket reporting the problem with the combo of Winfsp+Dropbox+Office (see https://github.com/cryptomator/cryptomator/issues/2880), but i also can't redproduce it anymore with Winfsp(Local Drive).
@QriMi Is this still happening when you select Winfsp (Local Drive)? Please note that you have to lock open vaults and unlock them again if you change the volume type.
Hello, yes bug always present with an updated system in Winfsp (Local Drive).
This problem still persists. Microsoft Office programs lock Read and Write when a file is opened in Word of Excel. When a file is unsaved, MS Office stores the file as .tmp file and then renames the file to .xls .doc after saving. The read and write lock seems to conflict with Cryptomator and results in Microsoft Office UNABLE to save the file. The result is an empty file with the name, but the size of zero bytes. The error output is:
0:07:27.469 [Thread-28] ERROR o.c.frontend.fuse.ReadWriteAdapter - unlink /Office_File.docx failed. java.nio.file.FileSystemException: C:\Dropbox\Office_File.docx: The process cannot access the file because it is being used by another process at java.base/sun.nio.fs.WindowsException.translateToIOException(Unknown Source) at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source) at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source) at java.base/java.nio.file.Files.deleteIfExists(Unknown Source) at [email protected]/org.cryptomator.cryptofs.common.DeletingFileVisitor.forceDeleteIfExists(DeletingFileVisitor.java:68) at [email protected]/org.cryptomator.cryptofs.common.DeletingFileVisitor.visitFile(DeletingFileVisitor.java:51) at [email protected]/org.cryptomator.cryptofs.common.DeletingFileVisitor.visitFile(DeletingFileVisitor.java:31) at java.base/java.nio.file.Files.walkFileTree(Unknown Source) at java.base/java.nio.file.Files.walkFileTree(Unknown Source) at [email protected]/org.cryptomator.cryptofs.CryptoFileSystemImpl.deleteFileOrSymlink(CryptoFileSystemImpl.java:431) at [email protected]/org.cryptomator.cryptofs.CryptoFileSystemImpl.delete(CryptoFileSystemImpl.java:425) at [email protected]/org.cryptomator.cryptofs.CryptoFileSystemProvider.delete(CryptoFileSystemProvider.java:241) at java.base/java.nio.file.Files.delete(Unknown Source) at [email protected]/org.cryptomator.frontend.fuse.ReadWriteAdapter.unlink(ReadWriteAdapter.java:226) at [email protected]/org.cryptomator.jfuse.api.FuseOperationsDecorator.unlink(FuseOperationsDecorator.java:72) at [email protected]/org.cryptomator.jfuse.win.FuseImpl.unlink(FuseImpl.java:273) 20:07:28.320 [Thread-26] WARN o.c.frontend.fuse.ReadWriteAdapter - Setting posix permissions not supported by underlying file system. 20:07:28.326 [Thread-24] WARN o.c.frontend.fuse.ReadWriteAdapter - Setting posix permissions not supported by underlying file system. 20:18:09.544 [Thread-25] WARN o.c.frontend.fuse.ReadWriteAdapter - Setting posix permissions not supported by underlying file system. 20:18:09.561 [Thread-25] ERROR o.c.frontend.fuse.ReadOnlyAdapter - rename /444BDB4B.tmp -> /Office_File.xls failed.
This is a huge issue and makes Cryptomator unusable for office work. Please find a solution!
@jacklki Your issue is different, see #2880.
I just noticed we have a second ticket for this. Closing this in favor of https://github.com/cryptomator/cryptomator/issues/2880