Rclone CANNOT work with cryptomator, a FOSS cloud encryption program

That program 's encryption implementation involve
producing EMPTY folders that include information on filename encryption.

say they produce empty folders like

/vault/d/FX/GHHDJFHSDUYFSYD34

but folder FX and folder GHHDJFHSDUYFSYD34 are of zero size.

when I rclone from google 1 to google 2,

rclone DIDn’t copy these empty folders and completely ignored them.

In this way the target encrypted data CANNOT be read.

I know others have filed as an issue.

But I just want to emphasis the importance for such a useful open source tool for the cloud era.

Thank you for your time.

ref:

my solution is to copy a placeholder file into every folder of the vault.

pls see:

You can do this using the for command with the /r switch, which is used to enumerate a directory tree. For example, this will copy the C:\a.jpg file to the C:\Test folder and all of its subfolders:

for /r “C:\Test” %%f in (.) do (
copy “C:\a.jpg” “%%~ff” > nul
)
The for /r “C:\Test” %%f in (.) statement enumerates the C:\Test folder and all its subfolders and %%~ff returns the current folder name.

This is the relevant rclone issue: https://github.com/ncw/rclone/issues/1837

1 Like

Its very kind of you to reply.

Yet, with respect, will there be some temp solution?

A script that add a dummy file to current empty folders will be enough.

The script I found will add dummy to all folder, it hurts.

I am not a programmer so i am a sitting duck.

thanks.

Here is how to add a dummy file to all empty directories

find /path/to/root -type d -empty -exec touch {}/dummyfile \;

Hope that helps!

1 Like

Hi~ Thx it worked.

I can run this by installing cygwin in windows.
Tested with rclone sync. Yes the target also contain the 0 byte dummp file.

The script worked, thankyou.

ps: cygwin is signatured so is safe to use.

there is a small tool “remove empty directory” that u can check whether there is empty folder before using rclone.
so that u sure there is no empty folder and everything is rclone-ed.

but it’s un-signed and I have to run it under sandboxie.

rclone can do this too… You could run rclone rmdirs --dry-run /path/to/wherever which would normally remove all empty directories, but with the --dry-run will just show them instead.

1 Like

Hi~

It worked for a while but today it complain…

Anyone know why? thanks

$ find . -type d -empty -exec touch {}/dummyfile ;
touch: cannot touch ‘./bc-ed-mir-as-ctmt/dummyfile’: Invalid request code
touch: cannot touch ‘./ctmt/20180314-115420–ctmtv133-www003–android/m/dummyfile’: Invalid request code
touch: cannot touch ‘./open/0-incoming/dummyfile’: Invalid request code
touch: cannot touch ‘./open/TitaniumBackup/dummyfile’: Invalid request code

this forum cant show “;” ?

$ find . -type d -empty -exec touch {}/dummyfile ;
touch: cannot touch ‘./bc-ed-mir-as-ctmt/dummyfile’: Invalid request code
touch: cannot touch ‘./ctmt/20180314-115420–ctmtv133-www003–android/m/dummyfile’: Invalid request code
touch: cannot touch ‘./open/0-incoming/dummyfile’: Invalid request code
touch: cannot touch ‘./open/TitaniumBackup/dummyfile’: Invalid request code

I only replaced a “.” with the “path”.

but this forum seems cant show ;

thanks

Invalid request code is EBADRQC. I have never seen that error in the wild before… rclone certainly doesn’t use it.

I suspect something up with cryptomator?

1 Like

i can use the script with 1 google drive but not the other.

the non-working one is from ebay…

thx anyway i think i have to sort out myself.

1 Like