{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/14048","labels_url":"https://api.github.com/repos/owncloud/core/issues/14048/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/14048/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/14048/events","html_url":"https://github.com/owncloud/core/issues/14048","id":57171325,"number":14048,"title":"User did not have the required privileges ({DAV:}read) for path \"principals/username”","user":{"login":"oeves","id":10940838,"avatar_url":"https://avatars.githubusercontent.com/u/10940838?v=3","gravatar_id":"","url":"https://api.github.com/users/oeves","html_url":"https://github.com/oeves","followers_url":"https://api.github.com/users/oeves/followers","following_url":"https://api.github.com/users/oeves/following{/other_user}","gists_url":"https://api.github.com/users/oeves/gists{/gist_id}","starred_url":"https://api.github.com/users/oeves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oeves/subscriptions","organizations_url":"https://api.github.com/users/oeves/orgs","repos_url":"https://api.github.com/users/oeves/repos","events_url":"https://api.github.com/users/oeves/events{/privacy}","received_events_url":"https://api.github.com/users/oeves/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":36,"created_at":"2015-02-10T12:59:07Z","updated_at":"2015-02-16T22:30:49Z","closed_at":null,"body":"### Actual behaviour\r\niOS and OS X is unable to sync contacts\r\nOS X Error: The operation couldn’t be completed. (CoreDAVErrorDomain error 2.)\r\niOS Error: Could not establish SSL Connection\r\n\r\n\r\n### Server configuration\r\n**Operating system**:\r\nDebian Wheezy 7.8 \r\n\r\n**Web server:**\r\nnginx 1.2.1\r\n\r\n**Database:**\r\nmysql 14.14\r\n**PHP version:**\r\nPHP 5.4.36-0+deb7u3 (fpm-fcgi)\r\n\r\n**ownCloud version:** \r\nownCloud 8.0 (stable)\r\n\r\n**Updated from an older ownCloud or fresh install:**\r\nUpgraded from previous stable version\r\nmoved data directory, saved config.php and placed it into the new owncloud version and set the new data directory. The upgrade worked well, but the clients cant sync contacts and calendars anymore. \r\n\r\n**List of activated apps:**\r\nActivity 1.2.0\r\nBookmarks 0.4\r\nCalendar 0.6.4\r\nContacts 0.3.0.18\r\nDeleted files 0.6.2\r\nFirst Run Wizard 1.1\r\nPDF Viewer 0.7\r\nPictures 0.6.0\r\nShare Files 0.6.0\r\nText Editor 0.4\r\nUpdater 0.4\r\nVersions 1.0.5\r\nVideo Viewer 0.1.3\r\n\r\n**The content of config/config.php:**\r\n<?php\r\n$CONFIG = array (\r\n  'instanceid' => ‘123321’,\r\n  'passwordsalt' => ‘123321’,\r\n  'datadirectory' => '/var/www/owncloud-data',\r\n  'dbtype' => 'mysql',\r\n  'version' => '8.0.0.7',\r\n  'dbname' => 'owncloud',\r\n  'dbhost' => '127.0.0.1',\r\n  'dbtableprefix' => 'oc_',\r\n  'dbuser' => 'owncloud',\r\n  'dbpassword' => ‘123321’,\r\n  'installed' => true,\r\n  'forcessl' => true,\r\n  'loglevel' => 4,\r\n  'theme' => '',\r\n  'maintenance' => false,\r\n  'trusted_domains' => \r\n  array (\r\n    0 => 'cloud.123321.12’,\r\n    1 => 'cloud.123321.13’,\r\n  ),\r\n  'mail_from_address' => 'no-reply',\r\n  'mail_smtpmode' => 'php',\r\n  'mail_domain' => 'cloud.123321.12’,\r\n  'secret' => ‘123321’,\r\n);\r\n\r\n**Are you using external storage, if yes which one:**\r\nno\r\n\r\n**Are you using encryption:**\r\nno\r\n\r\n### Client configuration\r\n**Operating system:**\r\niOS 8.1.3\r\n\r\n### Logs\r\n\r\n#### ownCloud log (data/owncloud.log)\r\n\r\n{\"reqId\":\"605072fb2dc469836a2f0d235aca1e82\",\"remoteAddr\":\"123.123.123.123\",\"app\":\"carddav\",\"message\":\"Exception: {\\\"Message\\\":\\\"User did not have the required privileges ({DAV:}read) for path \\\\\\\"principals\\\\\\/username\\\\\\\"\\\",\\\"Code\\\":0,\\\"Trace\\\":\\\"#0 \\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/3rdparty\\\\\\/sabre\\\\\\/dav\\\\\\/lib\\\\\\/Sabre\\\\\\/DAVACL\\\\\\/Plugin.php(712): Sabre\\\\\\\\DAVACL\\\\\\\\Plugin->checkPrivileges('principals\\\\\\/username', '{DAV:}read')\\\\n#1 [internal function]: Sabre\\\\\\\\DAVACL\\\\\\\\Plugin->beforeMethod('OPTIONS', 'principals\\\\\\/username')\\\\n#2 \\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/3rdparty\\\\\\/sabre\\\\\\/dav\\\\\\/lib\\\\\\/Sabre\\\\\\/DAV\\\\\\/Server.php(433): call_user_func_array(Array, Array)\\\\n#3 \\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/3rdparty\\\\\\/sabre\\\\\\/dav\\\\\\/lib\\\\\\/Sabre\\\\\\/DAV\\\\\\/Server.php(455): Sabre\\\\\\\\DAV\\\\\\\\Server->broadcastEvent('beforeMethod', Array)\\\\n#4 \\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/3rdparty\\\\\\/sabre\\\\\\/dav\\\\\\/lib\\\\\\/Sabre\\\\\\/DAV\\\\\\/Server.php(214): Sabre\\\\\\\\DAV\\\\\\\\Server->invokeMethod('OPTIONS', 'principals\\\\\\/username')\\\\n#5 \\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/apps\\\\\\/contacts\\\\\\/appinfo\\\\\\/remote.php(88): Sabre\\\\\\\\DAV\\\\\\\\Server->exec()\\\\n#6 \\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/remote.php(54): require_once('\\\\\\/var\\\\\\/www\\\\\\/ownclo...')\\\\n#7 {main}\\\",\\\"File\\\":\\\"\\\\\\/var\\\\\\/www\\\\\\/owncloud\\\\\\/3rdparty\\\\\\/sabre\\\\\\/dav\\\\\\/lib\\\\\\/Sabre\\\\\\/DAVACL\\\\\\/Plugin.php\\\",\\\"Line\\\":217}\",\"level\":4,\"time\":\"2015-02-10T12:47:56+00:00\"}username"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/74582572","html_url":"https://github.com/owncloud/core/issues/14048#issuecomment-74582572","issue_url":"https://api.github.com/repos/owncloud/core/issues/14048","id":74582572,"user":{"login":"blizzz","id":2184312,"avatar_url":"https://avatars.githubusercontent.com/u/2184312?v=3","gravatar_id":"","url":"https://api.github.com/users/blizzz","html_url":"https://github.com/blizzz","followers_url":"https://api.github.com/users/blizzz/followers","following_url":"https://api.github.com/users/blizzz/following{/other_user}","gists_url":"https://api.github.com/users/blizzz/gists{/gist_id}","starred_url":"https://api.github.com/users/blizzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blizzz/subscriptions","organizations_url":"https://api.github.com/users/blizzz/orgs","repos_url":"https://api.github.com/users/blizzz/repos","events_url":"https://api.github.com/users/blizzz/events{/privacy}","received_events_url":"https://api.github.com/users/blizzz/received_events","type":"User","site_admin":false},"created_at":"2015-02-16T22:30:49Z","updated_at":"2015-02-16T22:30:49Z","body":"@chris-se good finding, the return of OC_User::getUser() is indeed what should be passed to set(). Since it is used in the line before too, you can just call it once and store in a variable that you pass to setupFS() and set(). Do you mind opening a pull request? :)\r\n\r\ncc @LukasReschke "}}