Could not open the lock database - Apache WebDAV setup

ls -ld /var/www/
drwxr-xr-x. 9 root root 4096 Oct 11 15:54 /var/www/

chown -R apache:apache /var/www/, undo your change and try again.


This was a gotcha for me, but according to the documentation for mod_dav:

"The directory containing the lock database file must be writable by the User and Group under which Apache is running."

You have to make sure you have proper permissions on both the DAV lock DB file and the directory containing it.

In my fresh installation, the /var/www/ directory did not have write permissions set for the apache group. The /var/lib/dav/ directory has these permissions set by default, which is why it worked for Majid. Knowing this, you make a directory somewhere of your choosing with the proper permissions.

(Old question, but it still came up in my search. I'm not a fan of configuration voodo, so for me it helps to know why Majid Azimi's config change worked for him.)