New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GET requests sent by windows leading to file decryption when accessing file properties #145

Closed
atodtoa opened this Issue Feb 19, 2016 · 9 comments

Comments

Projects
None yet
4 participants
@atodtoa
Copy link

atodtoa commented Feb 19, 2016

$ time ls
y1.nbak

real 0m0.262s
user 0m0.000s
sys 0m0.031s

$ time ls -l y1.nbak
-rw-r--r-- 1 xxx xxx 1187081239 Feb 14 23:40 y1.nbak

real 1m8.521s
user 0m0.000s
sys 0m0.045s

While "ls -l" is running, the Cyrptomator throughput graph shows unexpected decryption activity.

@markuskreusch markuskreusch self-assigned this Feb 19, 2016

@markuskreusch

This comment has been minimized.

Copy link
Contributor

markuskreusch commented Feb 19, 2016

I checked this and could reproduce the problem with a 200MB files. It seems that sometimes ls is fast and sometimes it takes really long.

I debugged the HTTP traffic and it seems that a PROPFIND request issued against cryptomator causes the full file to be decrypted. That indeed should not happen and we will investigate further to fix this.

logoutput.txt

@markuskreusch markuskreusch added this to the 0.11 milestone Feb 19, 2016

@overheadhunter

This comment has been minimized.

Copy link
Member

overheadhunter commented Feb 19, 2016

to be retested on layered-io

@markuskreusch

This comment has been minimized.

Copy link
Contributor

markuskreusch commented Feb 26, 2016

Retested on master branch after merge of modifications to how we access the filesystem. A get request for the file used in ls -l is issued leading to decryption and sending to client. This seems to be a problem with cygwin / the webdav implementation of windows.

A request is not issued on every invocation of ls -l but cygwin or windows seems to cache the information for some while. When retrying after some minutes the full file is retrieved again.

2016-02-26 14:35:28,790 DEBUG [Server:506] REQUEST on HttpChannelOverHttp@1393233{r=8,c=false,a=DISPATCHED,uri=/test/foo.zip}
GET //localhost:54753/test/foo.zip
Cache-Control: no-cache
Connection: keep-alive
Pragma: no-cache
User-Agent: Microsoft-WebDAV-MiniRedir/6.1.7601
translate: f
Host: localhost:54753
2016-02-26 14:35:29,072 DEBUG [Server:520] RESPONSE for /test/foo.zip h=true
200 null
Date: Fri, 26 Feb 2016 13:35:28 GMT
Accept-Ranges: bytes
Last-Modified: Fri, 26 Feb 2016 13:30:07 GMT
Content-Length: 14621547

@markuskreusch

This comment has been minimized.

Copy link
Contributor

markuskreusch commented Feb 26, 2016

I did some further investigation and it seems that there is nothing we can do to avoid that the additional GET request is performed. It should not be required to run ls -l but is done by windows and leads to cygwin waiting for the full file to get decrypted which obviously is slow for larger files.

Using wireshark I could identify that the problem is not limited to cryptomator and not limited to cygwin. When a properties dialog of a file on a webdav share is opened in windows explorer a GET request is performed as well.

At the moment this issue can not be fixed but we may implement another way to provide a file system on windows in the future. Thus this issue will stay open. As an alternative we may be able to analyze in detail how windows accesses a webdav share and find a way to prevent those additional GET requests.

@markuskreusch markuskreusch changed the title file stat on encrypted file from Cygwin slow Windows issues GET requests leading to file decryption when accessing file properties Feb 26, 2016

@markuskreusch markuskreusch changed the title Windows issues GET requests leading to file decryption when accessing file properties GET requests send by windows leading to file decryption when accessing file properties Feb 26, 2016

@overheadhunter overheadhunter changed the title GET requests send by windows leading to file decryption when accessing file properties GET requests sent by windows leading to file decryption when accessing file properties Feb 27, 2016

@markuskreusch markuskreusch modified the milestones: Backlog, 1.x Apr 5, 2016

@markuskreusch markuskreusch modified the milestones: Backlog, 1.1 Apr 28, 2016

@overheadhunter overheadhunter modified the milestones: 1.1, 1.x May 10, 2016

@overheadhunter overheadhunter modified the milestones: 1.x, 1.4.0 Jun 20, 2018

@overheadhunter

This comment has been minimized.

Copy link
Member

overheadhunter commented Jun 20, 2018

Depends on #207

@kbauer

This comment has been minimized.

Copy link

kbauer commented Jun 21, 2018

Possibly relevant: https://cygwin.com/ml/cygwin/2011-02/msg00227.html

[...] determining whether the file is executable or
a symbolic link can cause the file to be opened.

Apparently parts of the stat system call end up reading the file in cygwin, triggering the decryption.

@overheadhunter

This comment has been minimized.

Copy link
Member

overheadhunter commented Jul 12, 2018

Good news, everyone! We've released version 1.4.0-beta2, which introduces Dokany support. You now have the choice between Dokany and WebDAV based virtual hard drives.

Please retest this issue with Dokany enabled.

@no-response

This comment has been minimized.

Copy link

no-response bot commented Jul 26, 2018

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@atodtoa

This comment has been minimized.

Copy link

atodtoa commented Jul 31, 2018

Yes, I no longer see the problem with 1.4.0-beta2 using Dokany. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment