Bug#420101: mod_dav fails to open the lock database because ownership of /var/lock/apache2 fails to set properly
Package: apache2.2-common
Version: 2.2.3-4
With the modules dav and dav_fs enabled, trying to write a file to a webdav resource fails with this error:
[Fri Apr 20 11:15:40 2007] [notice] Apache/2.2.3 (Debian) DAV/2 configured -- resuming normal operations
[Fri Apr 20 11:16:30 2007] [error] [client 192.168.12.1] The locks could not be queried for verification against a possible "If:" header. [500, #0]
[Fri Apr 20 11:16:30 2007] [error] [client 192.168.12.1] Could not open the lock database. [500, #400]
[Fri Apr 20 11:16:30 2007] [error] [client 192.168.12.1] (13)Permission denied: Could not open property database. [500, #1]
It fails because, after installing the apache2.2-common package, the ownership of the /var/lock/apache2/ directory is:
drwxr-xr-x 2 root root 4096 Apr 20 11:54 /var/lock/apache2/
whereas, according to its postinst script, the ownership should be:
drwxr-xr-x 2 www-data root 4096 Apr 20 11:54 /var/lock/apache2/
Inside postinst, we see this:
# Make sure /var/lock/apache2 has the correct permissions
if [ -d /var/lock/apache2 ]; then
chown www-data /var/lock/apache2
fi
but I'm not sure why it doesn't execute properly at installation time.
Suggested workarounds:
(1) run "chown www-data /var/lock/apache2" manually. Or,
(2) run "dpkg-reconfigure apache2.2-common", which sets the ownership properly.
apache2.2-common depends on:
apache2-utils, net-tools, libmagic1, mime-support, lsb-base, procps
I'm using:
Linux debian 2.6.18-4-486 #1 Mon Mar 26 16:39:10 UTC 2007 i686 GNU/Linux
and:
libc-2.3.6.so
--
Darren Paul Griffith, IT Systems Administrator
www.exoweb.net, +86 135 2262 5129
Reply to: