Nextcloud version: 19.0.6snap1
Operating system and version: Ubuntu 20.04.1 for both server and desktop
The issue you are facing:
Trying to find the proper way to use nc’s webdav on the nautilus on the ubuntu desktop. I want a mount point that is universal so the user can mount any user from nextcloud > like username/password.
The second goal is a single sing-on setup to mount nc’s webdav on login.
Problems:
1. Connecting with URL from NC’s manual. ( davs://HOST/remote.php/dav/files/USER/ )
Nautilus is making a mount point shortcut automatically to davs://HOST/remote.php/dav/ ! So If you click that you are moved to location with folders: addressbooks, avatars, calendars, comments, files, principals …
So you have not access to files folders with permission error: “This location could not be displayed. Sorry, could not display all the contest of “files”: HTTP-error: Method Not Allowed”
Also spamming to logs:
{“reqId”:"",“level”:0,“time”:“2021-01-19T11:07:57+00:00”,“remoteAddr”:"",“user”:"–",“app”:“webdav”,“method”:“HEAD”,“url”:"/remote.php/dav/files/",“message”:{“Exception”:“Sabre\DAV\Exception\NotAuthenticated”,“Message”:“No public access to this resource., No ‘Authorization: Basic’ header found. Either the client didn’t send one, or the server is misconfigured, No ‘Authorization: Bearer’ header found. Either the client didn’t send one, or the server is mis-configured, No ‘Authorization: Basic’ header found. Either the client didn’t send one, or the server is misconfigured”,“Code”:0,“Trace”:[{“file”:"/snap/nextcloud/25104/htdocs/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",“line”:89,“function”:“beforeMethod”,“class”:“Sabre\DAV\Auth\Plugin”,“type”:"->",“args”:[{“class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]},{“file”:"/snap/nextcloud/25104/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:458,“function”:“emit”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[“beforeMethod:HEAD”,[{“class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]]},{“file”:"/snap/nextcloud/25104/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:251,“function”:“invokeMethod”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[{“class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]},{“file”:"/snap/nextcloud/25104/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php",“line”:319,“function”:“start”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[]},{“file”:"/snap/nextcloud/25104/htdocs/apps/dav/lib/Server.php",“line”:320,“function”:“exec”,“class”:“Sabre\DAV\Server”,“type”:"->",“args”:[]},{“file”:"/snap/nextcloud/25104/htdocs/apps/dav/appinfo/v2/remote.php",“line”:35,“function”:“exec”,“class”:“OCA\DAV\Server”,“type”:"->",“args”:[]},{“file”:"/snap/nextcloud/25104/htdocs/remote.php",“line”:167,“args”:["/snap/nextcloud/25104/htdocs/apps/dav/appinfo/v2/remote.php"],“function”:“require_once”}],“File”:"/snap/nextcloud/25104/htdocs/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php",“Line”:161,“CustomMessage”:"–"},“userAgent”:“gvfs/1.44.1”,“version”:“19.0.6.2”}
Workaround is to use davs://HOST/remote.php/webdav/
But then you are getting lots of logs like this.
{“reqId”:"",“level”:0,“time”:“2021-01-19T11:06:02+00:00”,“remoteAddr”:"",“user”:"",“app”:“no app in context”,“method”:“MOVE”,“url”:"/remote.php/webdav/",“message”:“Deprecated event type for {”[object] (OCP\SabrePluginEvent)":{"*statusCode":200,"*message":"","*server":{"[object] (OCA\DAV\Connector\Sabre\Server)":{“tree”:"[object] (OCA\DAV\Connector\Sabre\ObjectTree)","*baseUri":"/remote.php/webdav/",“httpResponse”:"[object] (Sabre\HTTP\Response)",“httpRequest”:"[object] (Sabre\HTTP\Request)",“sapi”:"[object] (Sabre\HTTP\Sapi)","*plugins":[],“transactionType”:null,“protectedProperties”:{"…":“Over 20 items, aborting normalization”},“debugExceptions”:false,“resourceTypeMapping”:[],“enablePropfindDepthInfinity”:true,“xml”:"[object] (Sabre\DAV\Xml\Service)","*listeners":{"…":“Over 20 items, aborting normalization”},"*wildcardListeners":[],"*listenerIndex":[],"*logger":null}},“Symfony\Contracts\EventDispatcher\EventpropagationStopped”:false}}: null",“userAgent”:“gvfs/1.38.1”,“version”:“19.0.6.2”}
{“reqId”:"",“level”:0,“time”:“2021-01-19T11:06:02+00:00”,“remoteAddr”:"",“user”:"",“app”:“no app in context”,“method”:“PROPFIND”,“url”:"/remote.php/webdav/",“message”:“Deprecated event type for {”[object] (OCP\SabrePluginEvent)":{"*statusCode":200,"*message":"","*server":{"[object] (OCA\DAV\Connector\Sabre\Server)":{“tree”:"[object] (OCA\DAV\Connector\Sabre\ObjectTree)","*baseUri":"/remote.php/webdav/",“httpResponse”:"[object] (Sabre\HTTP\Response)",“httpRequest”:"[object] (Sabre\HTTP\Request)",“sapi”:"[object] (Sabre\HTTP\Sapi)","*plugins":[],“transactionType”:null,“protectedProperties”:{"…":“Over 20 items, aborting normalization”},“debugExceptions”:false,“resourceTypeMapping”:[],“enablePropfindDepthInfinity”:true,“xml”:"[object] (Sabre\DAV\Xml\Service)","*listeners":{"…":“Over 20 items, aborting normalization”},"*wildcardListeners":[],"*listenerIndex":[],"*logger":null}},“Symfony\Contracts\EventDispatcher\EventpropagationStopped”:false}}: null",“userAgent”:“gvfs/1.38.1”,“version”:“19.0.6.2”}
2. Using davfs2 real mount point with libpam-mount
That is the best option so far. There actually only one problem with it. It is thumbnailing every file and make huge traffic over the internet. Nautilus do not have option to disable thumbnails for spesific mount point. Someway they have implemented that davs:// network mount. I have no idea how.
Good things with davfs2 is caching, compression, gui optimized usage, user controlled refresh times. Maybe I should take down thumbnailing for whole system.
3. Ubuntu own network account integration spamming also unnessary reguest to /remote.php/caldav example and also logs like mentioned above. You lost universal login possibility to login with any account on nextcloud and storing password permanently in the keyring. This is the worst.