How to fix CalDAV|CardDAV|WebDAV problems

If you encounter the following scenario:

  • You can access your owncloud web interface
  • The owncloud sync client as well as WebDAV (via some WebDAV client, or a direct access in a browser via http://yourowncloud/remote.php/webdav) aren’t working (typically you will see a 401/403/405 error in the logs)
  • You’re getting a message “Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken. Please double check the installation guides.”

There are few common reasons for such a problem:

  1. You are using an outdated version of the client (upgrade to the newest version, available here, and try again)
  2. Rewrite module is not enabled / not configured or not working properly
  3. On the server running owncloud, a separate WebDAV module is enabled, and it interferes with owncloud’s built-in WebDAV module.
  4. You could have some required HTTP verbs disabled
  5. Your webserver has configured a Basic Auth authentication
  6. Your webserver isn’t passing your credentials to php in the standard way (You will see a message like “Sabre_DAV_Exception_NotAuthenticated No basic authentication headers were found”). See below for more info.
  7. You have a security software/module (like SELinux) running
  8. One or more module listen in this FAQ is installed / enabled
  9. You might be running ownCloud behind a reverse proxy; in that case you should ensure that your proxy is configured to pass WebDAV queries. See this forum thread for the case of the Pound reverse proxy: https://forum.owncloud.org/viewtopic.php?t=4949
  10. You are using php in cgi mode on CentOS.

“WebDAV interface seems to be broken” message
Basic infos about this problem could be found in the owncloud.log like described in this FAQ thread:

Lighttpd users
You need to update lighttpd to a version which supports the PATCH method (at least 1.4.32) or apply this patch to your old version:

http://redmine.lighttpd.net/issues/2424

See also the official documentation for some more infos:

http://doc.owncloud.org/server/6.0/admin_manual/installation/installation_source.html#lighttpd-configuration

Running a test suite against your WebDAV/CalDAV/CardDAV
With litmus it is possible to run some tests against the WebDAV URL of OC to test if your webserver is correctly configured. More infos can be found at the homepage of litmus:

http://www.webdav.org/neon/litmus/
http://sabre.io/dav/litmus/

There also several CalDAV/CardDAV test suites available:

http://trac.calendarserver.org/wiki/CalDAVTester
http://sourceforge.net/apps/trac/funambol-caldav/wiki/TestSuite
http://www.calconnect.org/ioptesting.shtml

To check the rewrite module (apache)
Make sure the rewrite module is enabled; as root, execute:

a2enmod rewrite

Make sure you have a line like this in your .htaccess:

RewriteEngine on

If you needed to change anything, restart your apache afterwards (“apache2ctl graceful”) - pay attention to any error messages you might receive during server startup!

If you have mod_fcgid running with apache
According to this commit:

you should make sure that the following apache modules are enabled:

mod_setenvif
mod_headers

when running mod_fcgid

To check for a WebDAV module:
If this is your own server, see this other FAQ entry about known problems with webserver modules.

If you have owncloud running on a hosting provider, check the provider’s configuration interface for your website on any WebDAV configuration options, and disable them, at least for the owncloud folder. If you don’t see any such option, you have to ask your hoster to do this for you.

To enable all HTTP verbs:

Workaround for the “No basic authentication headers were found” problem
Check these threads:

To fix problems with SELinux
Check e.g. this thread: http://forum.owncloud.org/viewtopic.php?f=3&t=5894&start=10

Authentication fails / special characters
Make first sure that you’re using no special chars in your password which could cause authentication failures:


Debugging
If nothing of the above helps using a command line tool like cadaver (http://www.webdav.org/cadaver/) like described here:

http://doc.owncloud.org/desktop/2.1/troubleshooting.html#identifying-basic-functionality-problems

could also provide useful informations about what’s wrong with your WebDAV setup.