Skip to content
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

DAV locking doesn't work. #1199

Closed
feinom opened this issue Jan 16, 2013 · 13 comments
Closed

DAV locking doesn't work. #1199

feinom opened this issue Jan 16, 2013 · 13 comments
Labels

Comments

@feinom
Copy link

feinom commented Jan 16, 2013

We're having some issues with the WebDAV locking implementation in ownCloud.

At first, we contacted Webdrive (the WebDAV client we're using) to see if it was a client bug. This is the response we received:

"""
Your server is not handling LOCK properly. It returns success and says it locked the file, however when webdrive later issues a PROPFIND request asking for the lockdiscovery propery your server is not returning any lock information for the file. I don't know why that is, but it's required to support LOCK and return lock information in the PROPFIND response if it's going to work with the webdrive auto dav lock feature. You can see this behavior without word. Map a drive, then select a file and right click and select properties, then DAV tab and lock the file, you can see the lock token returned by the server. Now close the dialog, and reopen the DAV tab the lock information is gone because PROPFIND didn't return it, it should.
"""

@DeepDiver1975
Copy link
Member

we miss some information - please use our issue template:
https://github.com/owncloud/core/blob/master/issue_template.md

@DeepDiver1975
Copy link
Member

According to litmus test suite locking works - I just executed litmus against a stable45 setup:

$ litmus -k  http://localhost/owncloud-phpstorm/remote.php/webdav/ admin admin
-> running `basic':
 0. init.................. pass
 1. begin................. pass
 2. options............... pass
 3. put_get............... pass
 4. put_get_utf8_segment.. pass
 5. put_no_parent......... pass
 6. mkcol_over_plain...... pass
 7. delete................ pass
 8. delete_null........... pass
 9. delete_fragment....... pass
10. mkcol................. pass
11. mkcol_again........... pass
12. delete_coll........... pass
13. mkcol_no_parent....... pass
14. mkcol_with_body....... pass
15. finish................ pass
<- summary for `basic': of 16 tests run: 16 passed, 0 failed. 100.0%
-> running `copymove':
 0. init.................. pass
 1. begin................. pass
 2. copy_init............. pass
 3. copy_simple........... pass
 4. copy_overwrite........ pass
 5. copy_nodestcoll....... pass
 6. copy_cleanup.......... pass
 7. copy_coll............. pass
 8. copy_shallow.......... pass
 9. move.................. pass
10. move_coll............. pass
11. move_cleanup.......... pass
12. finish................ pass
<- summary for `copymove': of 13 tests run: 13 passed, 0 failed. 100.0%
-> running `props':
 0. init.................. pass
 1. begin................. pass
 2. propfind_invalid...... pass
 3. propfind_invalid2..... pass
 4. propfind_d0........... pass
 5. propinit.............. pass
 6. propset............... pass
 7. propget............... pass
 8. propextended.......... pass
 9. propmove.............. pass
10. propget............... pass
11. propdeletes........... pass
12. propget............... pass
13. propreplace........... pass
14. propget............... pass
15. propnullns............ pass
16. propget............... pass
17. prophighunicode....... pass
18. propget............... pass
19. propremoveset......... pass
20. propget............... pass
21. propsetremove......... pass
22. propget............... pass
23. propvalnspace......... pass
24. propwformed........... pass
25. propinit.............. pass
26. propmanyns............ pass
27. propget............... pass
28. propcleanup........... pass
29. finish................ pass
<- summary for `props': of 30 tests run: 30 passed, 0 failed. 100.0%
-> running `locks':
 0. init.................. pass
 1. begin................. pass
 2. options............... pass
 3. precond............... pass
 4. init_locks............ pass
 5. put................... pass
 6. lock_excl............. pass
 7. discover.............. pass
 8. refresh............... pass
 9. notowner_modify....... pass
10. notowner_lock......... pass
11. owner_modify.......... pass
12. notowner_modify....... pass
13. notowner_lock......... pass
14. copy.................. pass
15. cond_put.............. pass
16. fail_cond_put......... pass
17. cond_put_with_not..... pass
18. cond_put_corrupt_token pass
19. complex_cond_put...... pass
20. fail_complex_cond_put. pass
21. unlock................ pass
22. fail_cond_put_unlocked pass
23. lock_shared........... pass
24. notowner_modify....... pass
25. notowner_lock......... pass
26. owner_modify.......... pass
27. double_sharedlock..... pass
28. notowner_modify....... pass
29. notowner_lock......... pass
30. unlock................ pass
31. prep_collection....... pass
32. lock_collection....... pass
33. owner_modify.......... pass
34. notowner_modify....... pass
35. refresh............... pass
36. indirect_refresh...... pass
37. unlock................ pass
38. unmapped_lock......... pass
39. unlock................ pass
40. finish................ pass
<- summary for `locks': of 41 tests run: 41 passed, 0 failed. 100.0%
-> running `http':
 0. init.................. pass
 1. begin................. pass
 2. expect100............. pass
 3. finish................ pass
<- summary for `http': of 4 tests run: 4 passed, 0 failed. 100.0%

@feinom
Copy link
Author

feinom commented Jan 25, 2013

Hi,

I got some more information about this from the developer of WebDrive. Since my last post, we have upgraded to ownCloud 4.5.6. We're running this on Centos 6.3 with Apache, and a MySQL cluster. PHP version is 5.3.3.

I haven't found anything of interest in the Apache logs or the ownCloud logs. Here is the new information I've received from the WebDrive developer:

Your server returns some information however the critical lock token is not returned on subsequent PROPFINDS. It is returned on the initial LOCK response but then the subsequent PROPFIND's does not return it. I have never seen a DAV server respond this way.

Here is the initial response to the LOCK command from your server


01/25/2013 18:44:43.297 (000.014) 0c78 [W:] <d:prop xmlns:d="DAV:">
01/25/2013 18:44:43.297 (000.013) 0c78 [W:] <d:lockdiscovery>
01/25/2013 18:44:43.297 (000.013) 0c78 [W:] <d:activelock>
01/25/2013 18:44:43.297 (000.013) 0c78 [W:] <d:lockscope>
01/25/2013 18:44:43.297 (000.014) 0c78 [W:] <d:exclusive/>
01/25/2013 18:44:43.297 (000.016) 0c78 [W:] </d:lockscope>
01/25/2013 18:44:43.297 (000.013) 0c78 [W:] <d:locktype>
01/25/2013 18:44:43.297 (000.013) 0c78 [W:] <d:write/>
01/25/2013 18:44:43.297 (000.013) 0c78 [W:] </d:locktype>
01/25/2013 18:44:43.297 (000.013) 0c78 [W:] <d:lockroot>
01/25/2013 18:44:43.297 (000.014) 0c78 [W:] <d:href>/remote.php/webdav/newglavin.docx</d:href>
01/25/2013 18:44:43.297 (000.013) 0c78 [W:] </d:lockroot>
01/25/2013 18:44:43.297 (000.013) 0c78 [W:] <d:depth>infinity</d:depth>
01/25/2013 18:44:43.297 (000.014) 0c78 [W:] <d:timeout>Second-300</d:timeout>
01/25/2013 18:44:43.297 (000.013) 0c78 [W:] <d:locktoken>
01/25/2013 18:44:43.298 (000.017) 0c78 [W:] <d:href>opaquelocktoken:13909727-67a6-4722-8a53-d93ff7ac6ba0</d:href>
01/25/2013 18:44:43.298 (000.014) 0c78 [W:] </d:locktoken>
01/25/2013 18:44:43.298 (000.013) 0c78 [W:] <d:owner>john (WebDrive) Share=0</d:owner>
01/25/2013 18:44:43.298 (000.014) 0c78 [W:] </d:activelock>
01/25/2013 18:44:43.298 (000.014) 0c78 [W:] </d:lockdiscovery>
01/25/2013 18:44:43.298 (000.013) 0c78 [W:] </d:prop>


This is good and contains the opaquelocktoken, the next PROPFIND returns


01/25/2013 18:44:54.969 (000.016) 0c7c [W:] <?xml version="1.0" encoding="utf-8"?>
01/25/2013 18:44:54.969 (000.014) 0c7c [W:] <d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"><d:response><d:hr
01/25/2013 18:44:54.969 (000.014) 0c7c [W:] ef>/remote.php/webdav/newglavin.docx</d:href><d:propstat><d:prop><d:lockdiscover
01/25/2013 18:44:54.969 (000.014) 0c7c [W:] y><d:activelock xmlns:d="DAV:"><d:lockscope><d:exclusive/></d:lockscope><d:lockt
01/25/2013 18:44:54.969 (000.014) 0c7c [W:] ype><d:write/></d:locktype><d:lockroot><d:href>/remote.php/webdav/newglavin.docx
01/25/2013 18:44:54.970 (000.020) 0c7c [W:] </d:href></d:lockroot><d:depth>infinity</d:depth><d:timeout>Second-300</d:timeou
01/25/2013 18:44:54.970 (000.014) 0c7c [W:] t><d:owner>john (WebDrive) Share=0</d:owner></d:activelock></d:lockdiscovery></d
01/25/2013 18:44:54.970 (000.014) 0c7c [W:] :prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:cr
01/25/2013 18:44:54.970 (000.014) 0c7c [W:] eatedby/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:re
01/25/2013 18:44:54.970 (000.013) 0c7c [W:] sponse></d:multistatus>

Which seems to contain everything except the lock token.

So the initial PROPFIND seems to be returning everything, but for some reason the next one doesn't include the lock token. The expected behavior is that it should.

Steps to reproduce is simply to lock a file and then issue several PROPFINDS on it afterwards.

I hope I managed to include all relevant information here now :-)

@hanibal8
Copy link

@DeepDiver1975: Can you tell me if there are any news about this problem? Do you think it can be solved for OC5?

@DeepDiver1975
Copy link
Member

@MTRichards do we have any experience regarding WebDrive? Does it work?
@icewind1991 Do you have further knowledge about DAV locking? THX

@karlitschek
Copy link
Contributor

@DeepDiver1975 Is this fixed with your latest LOCKing work?

@DeepDiver1975
Copy link
Member

@karlitschek hard to tell - #5342 fixes webdav lock for shared files/folders.
This issue is related to non shared files/folders.

@risacher
Copy link

I am still seeing similar behavior with 6.0.1.

@DeepDiver1975
Copy link
Member

I am still seeing similar behavior with 6.0.1.

yes - this issue is stil open

@MorrisJobke MorrisJobke changed the title ownCloud 4.5.5: DAV locking doesn't work. DAV locking doesn't work. May 6, 2014
@borconi
Copy link

borconi commented Aug 15, 2014

I'm having the same problem with 7.0 - Any workaround solution / suggestion?

@lisenet
Copy link

lisenet commented Dec 12, 2014

Any updates on this one? Having the same problem with 7.0.4.

@LukasReschke
Copy link
Member

@karlitschek We removed DAV locking in 8.1 as far I understand – so can we close this?

@karlitschek
Copy link
Contributor

Yes. From my point of view!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants