WebDAV locking issues

Trying to create a folder on my WebDAV share, using Cyberduck, but couldn’t:

The logs:

# tail -f /var/log/httpd/ssl_error_log

[Mon Feb 02 12:20:36.415327 2026] [dav:error] [pid 50869:tid 50979] [client 192.168.1.1:53060] The locks could not be queried for verification against a possible "If:" header.  [500, #0]

[Mon Feb 02 12:20:36.415404 2026] [dav:error] [pid 50869:tid 50979] [client 192.168.1.1:53060] Could not open the lock database.  [500, #400]

[Mon Feb 02 12:20:36.415412 2026] [dav:error] [pid 50869:tid 50979] (120002)APR does not understand this error code: [client 192.168.1.1:53060] Could not open database.  [500, #1]

[Mon Feb 02 12:20:36.526440 2026] [dav:error] [pid 50868:tid 50966] [client 192.168.1.1:53061] The locks could not be queried for verification against a possible "If:" header.  [500, #0]

[Mon Feb 02 12:20:36.526476 2026] [dav:error] [pid 50868:tid 50966] [client 192.168.1.1:53061] Could not open the lock database.  [500, #400]

[Mon Feb 02 12:20:36.526482 2026] [dav:error] [pid 50868:tid 50966] (120002)APR does not understand this error code: [client 192.168.1.1:53061] Could not open database.  [500, #1]


Where is the lock database?

# vi /etc/httpd/conf.d/webdav.conf

/var/lib/dav/lockdb


Turns out, that directory doesn’t exist, that’s a simple fix:

[root@server ~]# namei -l /var/lib/dav/lockdb

f: /var/lib/dav/lockdb

dr-xr-xr-x root root /

drwxr-xr-x root root var

drwxr-xr-x root root lib

                     dav - No such file or directory

[root@server ~]# mkdir -p /var/lib/dav/

[root@server ~]# chown apache:files /var/lib/dav/

[root@server ~]# namei -l /var/lib/dav/lockdb

f: /var/lib/dav/lockdb

dr-xr-xr-x root   root  /

drwxr-xr-x root   root  var

drwxr-xr-x root   root  lib

drwxr-xr-x apache files dav

                        lockdb - No such file or directory


Hopefully.

# systemctl restart httpd


And hey, what do you know, now it works:

192.168.1.1 - username [02/Feb/2026:12:25:55 -0800] "MKCOL /shares/documents/Law%20Firm/ HTTP/1.1" 201 247

192.168.1.1 - username [02/Feb/2026:12:25:55 -0800] "PROPFIND /shares/documents/Law%20Firm/ HTTP/1.1" 207 858


# namei -l /var/lib/dav/lockdb

f: /var/lib/dav/lockdb

dr-xr-xr-x root   root  /

drwxr-xr-x root   root  var

drwxr-xr-x root   root  lib

drwxr-xr-x apache files dav

-rwxr-xr-x apache files lockdb

Comments