WebDAV interface broken?

Nextcloud version 21.0.0
Operating system and version Ubuntu 20.04
nginx version 1.19.7
PHP version 8.0

The issue you are facing: Since upgrading to NC21 I get an error saying WebDAV interface seems to be broken.

Is this the first time you’ve seen this error? (Y/N):

Steps to replicate it:

  1. Log into Nextcloud
  2. Open Settings, select Overview
  3. Security and setup warnings shows error

I recently upgraded to NC21 and ever since I’ve been getting the following error message in red print:

Your web server is not yet properly set up to allow file synchronization, because the WebDAV interface seems to be broken.

(I’m also getting other errors, but I think they may be symptoms of this underlying cause.)

I’ve installed SabreDAV as per the documentation, but I’m still getting the error. Can anyone shed any light on the subject?

Ken

This kind of problem has already been addressed in the past. Please check-out if you can solve the problem based on the provided information:

https://help.nextcloud.com/search?q=WebDAV%20interface%20seems%20to%20be%20broken

Found the problem! I had installed ModSecurity and set the SecRuleEngine On instead of DetectionOnly. Setting it back to DetectionOnly fixed the WebDAV issue. Just in case anyone else has a similar problem.

1 Like

This is a very bad solution. You have basically neutered your firewall.

Better to look at your rule hits, and figure out if there are any rules you should selectively override.

For example, on my nextcloud server I override rules that I have found messing with Nextcloud functionality:

<LocationMatch "/index.php/apps/files/">
  SecRuleRemoveById 920420 949110 980130 920440

</LocationMatch>
<LocationMatch "/remote.php/dav/">
  SecRuleRemoveById 920420 949110 980130 920440

</LocationMatch>

This may not help with the infamous “WebDav interface broken” error, but then again, it’s up to the nextcloud/owncloud people to make that darn error more descriptive and readable - specifically to avoid bad solutions such as the one proposed in this thread.