Method Not Allowed WebDAV error appears to prevent discovery of addressbooks and calendars

help

#1

Please help us by providing the following info. Before posting please also check the pinned "Known issues" threads and make sure that you're running the latest available version for your oC release: https://owncloud.org/changelog/

Steps to reproduce
1. Verify correct WebDAV config and operation
a. Modify webserver to rewrite base to eliminate need for XXXX/owncloud/ in URL
b. Redirect using .well-known/caldav and .well-known/carddav
c. Verified 1a and 1b above work as expected using browser redirect to https://myowncloudserver/remote.php/dav
2. using eMClient on Windows, create CalDAV/CardDav account using https://myowncloudserver/
3. Enter username/password

Expected behaviour
I expect that eMClient would discover my calendars and addressbooks

Actual behaviour
eMClient authenticates correctly and then the log has a number of Method Not Allowed error messages

The only way to get it to work is to create an account for each addressbook/calendar.

Server configuration
Operating system: Debian Jessie 8.7
Web server: Apache 2.4.10 (Debian)
Database: Mysql 14.14 Distrib 5.5.54
PHP version: 5.6.30-0+deb8u1
ownCloud version (see ownCloud admin page): 9.1.4 (stable)
Updated from an older ownCloud or fresh install: Updated
Special configuration (external storage, external authentication, reverse proxy, server-side-encryption): None

ownCloud log (data/owncloud.log)

Please paste possible errors in the following code block, see https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808 for more info

Feb 21 06:31:42 gateway ownCloud[8683]: {webdav} Exception: {"Message":"HTTP\/1.1 405 Listing members of this collection is disabled","Exception":"Sabre\\DAV\\Exception\\MethodNotAllowed","Code":0,"Trace":"#0 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Tree.php(195): Sabre\\DAVACL\\AbstractPrincipalCollection->getChildren()\n#1 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(857): Sabre\\DAV\\Tree->getChildren('addressbooks\/us...')\n#2 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(911): Sabre\\DAV\\Server->addPathNodesRecursively(Array, Object(Sabre\\DAV\\PropFind))\n#3 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(334): Sabre\\DAV\\Server->getPropertiesForPath('addressbooks\/us...', Array, 1)\n#4 [internal function]: Sabre\\DAV\\CorePlugin->httpPropFind(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#5 \/var\/www\/owncloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#6 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\\Event\\EventEmitter->emit('method:PROPFIND', Array)\n#7 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#8 \/var\/www\/owncloud\/apps\/dav\/lib\/Server.php(178): Sabre\\DAV\\Server->exec()\n#9 \/var\/www\/owncloud\/apps\/dav\/appinfo\/v2\/remote.php(30): OCA\\DAV\\Server->exec()\n#10 \/var\/www\/owncloud\/remote.php(164): require_once('\/var\/www\/ownclo...')\n#11 {main}","File":"\/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAVACL\/AbstractPrincipalCollection.php","Line":95,"User":"alan"}

Integrity status for oC9+

Login as admin user into your ownCloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.
No errors have been found.

I am asking for clarification if this is expected behavior, behavior I can change as an admin or something broken in the client app.

I use eMClient on Windows, and can manually configure addressbooks and calendars using the specific URL for each calendar and addressbook, and they appear in eMClient and work as expected. I am unable to use the server URL and have eMClient discover the addressbooks and calendars. eMClient identifies as my owncloud server as a CalDAV/CardDAV server - so it appears to want to use a config single entry.

Using Evolution on Linux I have to enter the entire URL for the calendars (I expected to do so for addressbooks, as Evolution only supports webDAV, so I suspect it cannot use the well-known redirects), everything works as expected at that point, using just the server URL, Evolution doesn't find any calendars.

By contrast, with DavDROID on Android (and carddav-sync and caldav-sync from dmfs), I have no issues, the server URL is enough and everything works as expected.

I logged in to my server using cadaver, and was able to reproduce the issue eMClient has - basically, if I perform an "ls" on folder levels between remote.php/dav and the specific folders containing the addressbooks and calendars I get an error message. If I perform an "ls" at remote.php/dav I see all the folders for all the various webDAV entries etc.

The impression I have is eMClient wants to walk the folder tree to find the addressbooks and calenders - is this normal for calDAV/cardDAV clients? If so, is there an issue with the webserver config that means the folders to which the user has no access are also not visible to the user? If so, is this an apache config issue?

Any pointers are appreciated.

Thanks

Alan