Issues Encountered After Migrating from gocryptfs to Cryptomator over rclone sftp mount

Hello Cryptomator Community,

I recently switched from gocryptfs to Cryptomator due to issues with excessively long paths in my vault. Initial testing on a small dataset confirmed that Cryptomator would work better for my use case. However, after migrating my 2TB vault containing 350,000 files, I encountered several problems.

To avoid path length issues, I am using aggressive filename shortening (69-character limit). My Cryptomator vaults are mounted over SFTP to a Linux machine. I have ensured that neither my connection nor the Linux system itself is causing the issues. My rclone mount command looks as follows:

rclone -v --vfs-cache-mode full --vfs-cache-max-size 8G --vfs-read-chunk-size-limit 128M --vfs-cache-max-age 1m --inplace nas-host:/pool/hotdata/ /tmp/hotdata/

I am facing two major and one small issues issues:

  1. Missing .c9r Files (CryptoPathMapper Warning)

Some directories inside my vault seem to be missing valid content, resulting in the following error:

20:21:29.984 [Thread-38] WARN  o.c.cryptofs.CryptoPathMapper - Did not find valid content inside of /tmp/hotdata/cryptomator/work_docs/d/2Y/BTJVQVZHUNB5IB2UN4L7MOTFWURTZU/7-jWraYQcnBi71tbxrl01SmFsZp2BsgYuKUwRcZr-OqFzw==.c9r

This issue affects directories with shortened names. Files inside these directories cannot be accessed from within the vault, and I need to manually locate and delete them.

A workaround I created is the following command:

grep "Did not find valid content inside of" ~/.local/share/Cryptomator/logs/cryptomator?.log | cut -d' ' -f14 | sort -h | uniq | xargs -t -r -n 8 rmdir -v

From rclone debug logs, I can confirm that the .c9r files (both name.c9r and content.c9r) were never created. Instead, the application returns an input/output error to app which creates the files.

  1. Silent Data Corruption (C9sInflator Warning)

The second issue is more concerning as it results in silent data corruption. I get warnings such as:

22:02:28.390 [Thread-66] WARN  o.c.cryptofs.dir.C9sInflator - //tmp/hotdata/cryptomator/work_docs/d/OV/SYYYQBZJDJIT3NI7KXXSC7FCCONU7E/u_FYgdUgf-R6XvGmL4SfL-tmDew=.c9s could not be inflated.

The affected file exists but appears incomplete (partially written). Cryptomator does not propagate any errors to the application, making this a serious risk for data integrity.

  1. Incorrect du -sch Output (Size Always 0)

A minor but annoying issue is that running du -sch on directories or files inside the vault always returns 0 bytes, for example:

[nikow@thinira testownikow]$ du -sch dmesg/*
0	dmesg/2024-10-26
0	total

Is there a known workaround for this?

All of these issues occur both in newest Cryptomator Desktop and cryptomator-cli. First i was thinking it’s the fault of the cli version, but vaults never touched by it (just by desktop app) are affected too. During my tests i didn’t had any sudden power loses or reboots.

Any insights or potential fixes would be greatly appreciated!

Thanks in advance!
Nikow