[Owncloud] WebDAV copied files have 0 bytes - sometimes...

cosch cosch at torfbruecke.net
Tue Jan 3 15:27:19 UTC 2012

Hello again,

> In OC, there's 1.5.4. I tried replacing 3rdparty/Sabre with lib/Sabre
> from the SabreDAV 1.5.5 distribution. Didn't change anything.
> OTOH, I don't think it's related to OS X. I get this issue also for
> a simple "cp $file $src" from within the terminal. There are no
> _ files involved. And it also happens on Linux as a client, where
> there are for sure not ._ files at all.

I am able to reproduce the problem also with davfs2 on linux, if it uses
So i went deeper into Sabre and found this function to be the problem:

    3rdparty/Sabre/DAV/Locks/Plugin.php - line 586:

Sabre_DAV_Locks_Plugin::validateLock(..)  throws a
"Sabre_DAV_Exception_PreconditionFailed" if it is not able to match the
clients lock.
If i comment out this (==ignoring the lock validation fails) the request
rest  through and the files are beeing written. Obiously this is not a
good idea so one would need to debug this deeper...

Is there a way to get sabre to write logfiles?
Any other idea how to debug this?

Btw: the token which is send by davfs2 is just fine as far as i can see:

the token returned by OC on the LOCK request:
Lock-Token: <opaquelocktoken:9a42eca1-22b6-4ef3-8bf2-3b5d12943572>\r\n

the token used in PUT request:
If: <http://my.server.here/files/webdav.php/debug.log>


More information about the Owncloud mailing list