davfs2 on Karmic claims non existent files exist

Following a recent update, started getting errors copying files to a WebDAV mount point:

cp: cannot create regular file `./todo': File exists

And when creating a new file:

touch: cannot touch `alain.test': File exists

The error in the Apache log was:

[Thu Feb 25 22:52:42 2010] [error] [client xx.xx.xx.xx] Could not LOCK /path/to/alain.test due to a failed precondition (e.g. other locks).  [412, #0]

This is happening in Karmic with davfs2 1.4.1-1, but not in Intrepid with davfs2 1.3.3-1.

For now, running this on the client resolves the error:

echo "if_match_bug 1" >> /etc/davfs2/davfs2.conf


  • 1. Alain Kelder replies at 23rd January 2011, 11:27 pm :

    Can confirm that this issue persists on 10.10 (Maverick)

  • 2. Alain Kelder replies at 18th May 2011, 6:18 pm :

    And in Debian Wheezy…

  • 3. Stephan replies at 8th November 2011, 4:57 am :

    Thank you, just found your fix, it helped.
    The real bug was fixed in Apache 2.2.8, davfs2 only disabled its workaround in 1.4.0 (if_match_bug defaults now to 0)

Leave a comment

NOTE: Enclose quotes in <blockquote></blockquote>. Enclose code in <pre lang="LANG"></pre> (where LANG is one of these).