cryptomator / webdav-nio-adapter

Jackrabbit-based servlets running on embedded Jetty to serve a directory specified by a java.nio.file.Path
GNU Affero General Public License v3.0
12 stars 8 forks source link

fusedav can write files to cryptomator on Ubuntu Linux 17.10, but gets back nulls when reading them #18

Open jikamens opened 6 years ago

jikamens commented 6 years ago

I have Ubuntu Linux 17.10 x86_64, cryptomator 1.3.2-0ppa2 from the cryptomator repository, and fusedav 0.2-3.1 from the Ubuntu repository.

When I unlock my vault in the cryptomator GUI and then try to mount it with fusedav, fusedav spits out several complaints about PROPFIND failures, but then seems to mount the filesystem anyway. I see that these PROPFIND errors are commented on in other issues within this project and are apparently save to ignore, but there's another issue...

Once I've mounted my cryptomator WebDAV URL with fusedav, I am able to write files into the fuse filesystem with no trouble. E.g., if I've mounted on ~/c, then echo foo > ~/c/bar.txt works just fine, and if I then double-click on bar.txt in the cryptomator GUI, it indeed has the contents I expect, i.e., the word "foo" followed by a newline.

However, if I type cat ~/c/bar.txt at the command line, I get back nothing. Well, actually, not nothing. It's getting back nulls where the characters of the file should be:

$ cat ~/c/bar.txt | od -x
0000000 0000 0000
0000004
$ 

Is this a known issue? Is there a fix?

Thanks.

overheadhunter commented 6 years ago

Is this a known issue?

No, didn't know this. Very odd issue. Can you log the http requests and responses, ideally using some proxy like burp suite?

fusedav -> localhost:8080 (http log proxy) -> localhost:42427 (cryptomator)
jikamens commented 6 years ago

See attached Wireshark dump.

This is the traffic captured from port 42427 on the loopback interface when I run fusedav [webdav-url] ~/c, then cat ~/c/bar.txt, then fusermount -u ~/c.

Note that there is a newer fusedav project (https://github.com/pantheon-systems/fusedav) than the one I am using, but it's a mess to compile it on Ubuntu, and when I finally got it to compile, I couldn't get it to work because apparently it's expecting some sort of config file but I couldn't find any documentation anywhere of what the format of the config file should be. Basically, it doesn't seem to be a very well-maintained project.

fusedav.pcapng.zip

overheadhunter commented 6 years ago

Btw are you aware, that we support FUSE natively starting with Cryptomator 1.4.0-beta1?

jikamens commented 6 years ago

I am now. ;-) Thanks.