owncloud / core

:cloud: ownCloud web server core (Files, DAV, etc.)
https://owncloud.com
GNU Affero General Public License v3.0
8.37k stars 2.06k forks source link

WebDAV issue with shared folders in 4.5.2: can't overwrite files #478

Closed feinom closed 11 years ago

feinom commented 11 years ago

Whenever I try to overwrite a file, the server responds with HTTP code 500 (internal server error). The same issue occurs when trying to edit a .txt file using Notepad. It seems that PUT requests cause this error when another file with the same name already exists on the server.

Reproduce: Create a file in a folder that is shared by another user. Try to replace this file with a different one that has the same filename.

Here is what I'm seeing in Apache's access log:

x.x.x.x - usr [16/Nov/2012:12:37:15 +0100] "PUT /remote.php/webdav/Shared/test/df.txt HTTP/1.1" 500 447 x.x.x.x - usr [16/Nov/2012:12:37:15 +0100] "PUT /remote.php/webdav/Shared/test/df.txt HTTP/1.1" 500 447 x.x.x.x - usr [16/Nov/2012:12:37:15 +0100] "PUT /remote.php/webdav/Shared/test/df.txt HTTP/1.1" 500 447

karlitschek commented 11 years ago

Can you have a separate php error log somewhere? Or can you have a look into the owncloud.log in the data directory? It would be good so know if there are errors logged

feinom commented 11 years ago

There is no owncloud.log file in the data directory. I assume that means that nothing has been logged? The php error log doesn't contain anything from the relevant time period. Is there anything I can do to adjust the verbosity of the logging?

treynolen commented 11 years ago

I believe this is a duplicate of issue #443

schiessle commented 11 years ago

Should be fixed with this pull request: https://github.com/owncloud/core/pull/521 Can you try if this fix works for you?

treynolen commented 11 years ago

I can confirm that the patch fixes the save issue in that it no longer corrupts the original file or gives an error on the save. Also, if the file is then accessed (after an update) through the web interface, it is correct. However, if you update a file, save it, and then open it again with webdav, the changes are not seen. It seems to be caching the original.

schiessle commented 11 years ago

I tried it with different webdav clients (all under GNU/Linux) but can't reproduce it. If your assumption is correct that it might be a caching problem than it sounds more like a client issue. I would recommend to check your client and maybe try a different one to isolate the problem.

treynolen commented 11 years ago

I think you are correct. I was using NetDrive, and checking their forums, it seems that caching is an issue with that program. Thank you for the help, I believe you can classify this as resolved.