with Cryptomator 1.5.0 we updated our vault format to version 7. One of three key changes is the increased encrypted file name length. This can cause the problem, that encrypted files with a too long name don’t get synced to your cloud. This post describes how you can solve this problem and prevent it for the future, it does not describe the backgrounds. If your are interested, I refer to our docs and this thread.
That off the table, let’s get to the
Root of the Problem
To keep compatibility with all kind of filesystems and cloud storage providers, Cryptomator shortens the length of the encrypted file names. As long as this maximal file name length is bound to the storage location, the app can detect this limit and sets it locally for the vault. Unfortunately some cloud storage providers only implement the file name length limit in their sync client, which Cryptomator cannot detect.
The current workaround for this problem is to set the threshold manually.
For each vault the threshold is stored with the key
"filenameLengthLimit" in the settings file of Cryptomator,
settings.json. You can find it in the same location like the log files. This post explains how you can determine the correct value. But before changing it, you probably need to fix your vault.
Fix 1: Shorten your decrypted filenames
This method only works if no application depends on the naming of the too long files and if there aren’t too many.
Cryptomator preservers the time stamps (creation, modifaction and last access) of your files, because these are needed for proper synchronisation. You can use this for your benefit. You sync client should point to the encrypted file, which got too long. Remember the time stamps of these files and look inside your vault for files with long names and the same timestamps (e.g. by using a script). Once you found the decrypted file names inside your vault, shorten them until the client does not mope around anymore.
Afterwards, quit Cryptomator, open the settings file of Cryptomator and set the number of
"filenameLengthLimit" key to the correct value for the vault in question.
Workaround 2: Migrate to a vault with shorter threshold
The other way is to create a fresh vault, change directly after creation the shortening threshold and then copy all files from the old vault to the new one.
This may be the more feasible approach if a lot of files needs to be renamed.
This filename length limit is only stored locally. This implies, that if you use the vault on another computer you need to apply this setting again to prevent sync problems there.