Tuesday, January 3, 2012

Problem with WebDAV folders in debian linux

Here is my problem:

When I try to copy some files / folders to webdav folder, I get an error in Windows XP and this log in my Linux box:

[Tue Jan 03 13:49:35 2012] [error] [client 123.123.123.123] File does not exist: /the/webdav/folder/some-file.JPG
[Tue Jan 03 13:49:35 2012] [error] [client 123.123.123.123] The locks could not be queried for verification against a possible "If:" header. [500, #0]
[Tue Jan 03 13:49:35 2012] [error] [client 123.123.123.123] Could not open the lock database. [500, #400]
[Tue Jan 03 13:49:35 2012] [error] [client 123.123.123.123] (2)No such file or directory: Could not open property database. [500, #1]


What i did:
1. Checked the mod_dav_fs config:

niskia:/var/lock/apache2# cat /etc/apache2/mods-enabled/dav_fs.conf
DAVLockDB ${APACHE_LOCK_DIR}/DAVLock

Everithing seems OK.
2. Checked apache lock folder:

niskia:/var/lock/apache2# ls -la /var/lock/apache2/
total 8
drwxr-xr-x 2 apache root 60 Jan 3 13:53 .
drwxrwxrwt 3 root root 80 Jan 3 07:39 ..

Seems OK, the folder is writable by my apache user ("apache")
3. Created the webdav lock folder:
/var/lock/apache2/DAVLock -> This is an error, DAVLockDB is NOT a folder but a file and it must not be created manually.
4. What was wrong? The file envvars

niskia:/etc/apache2# cat /etc/apache2/envvars
export APACHE_RUN_USER=apache
export APACHE_RUN_GROUP=users
export APACHE_RUN_DIR=/var/run/apache2
export APACHE_PID_FILE=/var/run/apache2.pid
export APACHE_LOG_DIR=/var/log/apache2

The missing part was:

export APACHE_LOCK_DIR=/var/lock/apache2

5. For the final solution I just restarted the apache and everything goes fine:

/etc/init.d/apache2 restart

No comments:

Post a Comment