Cryptomator and rsync: cannot stat destination even if I run rsync with sudo

I have a (FUSE-mounted) Cryptomator vault on a disk (HDD) which is mounted at startup.

Once I open the vault, I can safely copy and paste files from anywhere into it. However, if I try to use rsync to sync a folder (on my main SSD, or on an external drive) with a subfolder in the Cryptomator vault, I get the following error:

rsync: [Receiver] ERROR: cannot stat destination “/home/geppetto/.local/share/Cryptomator/mnt/geppeto_cryptomator/test”: Permission denied (13)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(772) [Receiver=3.2.7]
rsync: [sender] write error: Broken pipe (32)
rsync error: error in socket IO (code 10) at io.c(848) [sender=3.2.7]

It seems it’s a permission error, but I run rsync as sudo, and the folder inside which there is the Cryptomator vault is owned by the user geppetto, in whose home the vault is mounted.

What can I do to understand what happens?

Instead of using rsync try using a more modern technology that behaves and works similarly to that program called Rclone.

I have not tested it so I can’t not confirm for you that it will work better but it can’t be worse.

Thanks for the reply. However, I think I do not get your point.

Why are you suggesting something like rclone instead of rsync? What do you think is the problem with rsync with respect to my issue?

I will nonetheless look into rclone and see if it can be used. However, I really would like to understand what happens, irrespectively of a possible solution.

I’ve been a Linux admin for about 30 years and was first introduced to rsync about that long ago. I have switched over to rclone.

I don’t know what your specific problem is however this is a single file executable that you operate from the command line on any operating system Windows Linux or Mac and can probably let you accomplish whatever it is you’re trying to do and it may work it may not but it’s worth a shot.

Rclone can copy, sync, and even mount cloud drives.

I’m mearly offering a possible solution while I don’t know what your specific problem is.

Are you executing rsync as an admin user or with sudo? If so, you have to adjust your fuse config and the vault options, because by default, only the current user can access the Cryptomator vault mountpoint. See also Volume Types — Cryptomator 1.7.0 documentation

Thank you very much for the suggestion!

When using rclone, it worked at the first try, without any problem because I did not use sudo (see my other reply).

In any case, I will start experimenting with rclone thanks to your suggestion :wink:

1 Like

Thank you very much! It was precisely this the problem. I was using sudo, and when I stopped using it, everything worked like a charm.

Moreover, to make it work with sudo, I uncommented the line user_allow_other in /etc/fuse.conf, and then I added -oallow_root in the FUSE mounting flags in Cryptomator.

It’s always satisfying to understand the problems you face. Thanks again!