nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.78k stars 4k forks source link

SMB Shares not working on v18.0.4 #20622

Closed hartundweich closed 4 years ago

hartundweich commented 4 years ago

How to use GitHub

Steps to reproduce

  1. click on external SMB Share

Expected behaviour

open the external SMB share in nextcloud Browser

Actual behaviour

the following error is thrown {"reqId":"XqIMjvSGOMa0yvHRtHpndwAAAB0","level":4,"time":"2020-04-23T23:45:50+02:00","remoteAddr":"77.119.253.32","user":"andrfrag","app":"webdav","method":"GET","url":"/remote.php/webdav/G%3A%20(zentrale)","message":{"Exception":"Sabre\\DAV\\Exception","Message":"Invalid request for / (InvalidTypeException)","Code":0,"Trace":[{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/lib/Connector/Sabre/File.php","line":418,"function":"convertToSabreException","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[{"__class__":"Icewind\\SMB\\Exception\\InvalidTypeException"}]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[]},{"function":"httpGet","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https://cloud.wienxtra.at/remote.php/webdav/G%3A%20(zentrale)","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpGet"],[{"absoluteUrl":"https://cloud.wienxtra.at/remote.php/webdav/G%3A%20(zentrale)","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:GET",[{"absoluteUrl":"https://cloud.wienxtra.at/remote.php/webdav/G%3A%20(zentrale)","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https://cloud.wienxtra.at/remote.php/webdav/G%3A%20(zentrale)","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php","line":82,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/remote.php","line":165,"args":["/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/lib/Connector/Sabre/File.php","Line":659,"Previous":{"Exception":"Icewind\\SMB\\Exception\\InvalidTypeException","Message":"Invalid request for / (InvalidTypeException)","Code":21,"Trace":[{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php","line":66,"function":"fromMap","class":"Icewind\\SMB\\Exception\\Exception","type":"::","args":[{"1":"Icewind\\SMB\\Exception\\ForbiddenException","2":"Icewind\\SMB\\Exception\\NotFoundException","13":"Icewind\\SMB\\Exception\\ForbiddenException","16":"Icewind\\SMB\\Exception\\FileInUseException","17":"Icewind\\SMB\\Exception\\AlreadyExistsException","20":"Icewind\\SMB\\Exception\\InvalidTypeException","21":"Icewind\\SMB\\Exception\\InvalidTypeException","22":"Icewind\\SMB\\Exception\\InvalidArgumentException","28":"Icewind\\SMB\\Exception\\OutOfSpaceException","39":"Icewind\\SMB\\Exception\\NotEmptyException","103":"Icewind\\SMB\\Exception\\ConnectionAbortedException","104":"Icewind\\SMB\\Exception\\ConnectionResetException","110":"Icewind\\SMB\\Exception\\TimedOutException","111":"Icewind\\SMB\\Exception\\ConnectionRefusedException","112":"Icewind\\SMB\\Exception\\HostDownException","113":"Icewind\\SMB\\Exception\\NoRouteToHostException"},21,"/"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php","line":78,"function":"handleError","class":"Icewind\\SMB\\Native\\NativeState","type":"->","args":["/"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php","line":212,"function":"testResult","class":"Icewind\\SMB\\Native\\NativeState","type":"->","args":[false,"smb://wx-ztdc1s/default/"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php","line":263,"function":"open","class":"Icewind\\SMB\\Native\\NativeState","type":"->","args":["smb://wx-ztdc1s/default/","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/files_external/lib/Lib/Storage/SMB.php","line":416,"function":"read","class":"Icewind\\SMB\\Native\\NativeShare","type":"->","args":["/"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Files/Storage/Wrapper/Wrapper.php","line":299,"function":"fopen","class":"OCA\\Files_External\\Lib\\Storage\\SMB","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Files/Storage/Wrapper/PermissionsMask.php","line":122,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Files/Storage/Wrapper/Wrapper.php","line":299,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\PermissionsMask","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Files/Storage/Wrapper/PermissionsMask.php","line":122,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Files/Storage/Wrapper/Wrapper.php","line":299,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\PermissionsMask","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Files/Storage/Wrapper/Availability.php","line":314,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Files/Storage/Wrapper/Wrapper.php","line":299,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Availability","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/files_accesscontrol/lib/StorageWrapper.php","line":325,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/ransomware_protection/lib/StorageWrapper.php","line":317,"function":"fopen","class":"OCA\\FilesAccessControl\\StorageWrapper","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Files/View.php","line":1160,"function":"fopen","class":"OCA\\RansomwareProtection\\StorageWrapper","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Files/View.php","line":996,"function":"basicOperation","class":"OC\\Files\\View","type":"->","args":["fopen","/G: (zentrale)",["read"],"r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/lib/Connector/Sabre/File.php","line":416,"function":"fopen","class":"OC\\Files\\View","type":"->","args":["G: (zentrale)","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[]},{"function":"httpGet","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https://cloud.wienxtra.at/remote.php/webdav/G%3A%20(zentrale)","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpGet"],[{"absoluteUrl":"https://cloud.wienxtra.at/remote.php/webdav/G%3A%20(zentrale)","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:GET",[{"absoluteUrl":"https://cloud.wienxtra.at/remote.php/webdav/G%3A%20(zentrale)","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https://cloud.wienxtra.at/remote.php/webdav/G%3A%20(zentrale)","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php","line":82,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/remote.php","line":165,"args":["/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php","Line":30},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36","version":"18.0.4.2"} {"reqId":"XqIMjvSGOMa0yvHRtHpndwAAAB0","level":3,"time":"2020-04-23T23:45:50+02:00","remoteAddr":"77.119.253.32","user":"andrfrag","app":"PHP","method":"GET","url":"/remote.php/webdav/G%3A%20(zentrale)","message":"Undefined index: debugMode at /lamp/webspace/cloud.wienxtra.at/htdocs/core/templates/exception.php#17","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36","version":"18.0.4.2"} {"reqId":"XqIMjvSGOMa0yvHRtHpndwAAAB0","level":3,"time":"2020-04-23T23:45:50+02:00","remoteAddr":"77.119.253.32","user":"andrfrag","app":"PHP","method":"GET","url":"/remote.php/webdav/G%3A%20(zentrale)","message":"Undefined index: debugMode at /lamp/webspace/cloud.wienxtra.at/htdocs/core/templates/exception.php#26","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36","version":"18.0.4.2"} {"reqId":"XqIMjvSGOMa0yvHRtHpndwAAAB0","level":3,"time":"2020-04-23T23:45:50+02:00","remoteAddr":"77.119.253.32","user":"andrfrag","app":"no app in context","method":"GET","url":"/remote.php/webdav/G%3A%20(zentrale)","message":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"passwords.page.index\" as such route does not exist.","Code":0,"Trace":[{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Route/Router.php","line":339,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->","args":["passwords.page.index",[],1]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/URLGenerator.php","line":82,"function":"generate","class":"OC\\Route\\Router","type":"->","args":["passwords.page.index",[]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/NavigationManager.php","line":293,"function":"linkToRoute","class":"OC\\URLGenerator","type":"->","args":["passwords.page.index"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/NavigationManager.php","line":114,"function":"init","class":"OC\\NavigationManager","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/theming/lib/ThemingDefaults.php","line":182,"function":"getAll","class":"OC\\NavigationManager","type":"->","args":["guest"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/public/Defaults.php","line":160,"function":"getShortFooter","class":"OCA\\Theming\\ThemingDefaults","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Template/JSConfigHelper.php","line":284,"function":"getShortFooter","class":"OCP\\Defaults","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/TemplateLayout.php","line":190,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/legacy/template.php","line":184,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["guest","core"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/lib/Files/BrowserErrorPagePlugin.php","line":107,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/lib/Files/BrowserErrorPagePlugin.php","line":84,"function":"generateBody","class":"OCA\\DAV\\Files\\BrowserErrorPagePlugin","type":"->","args":[500]},{"function":"logException","class":"OCA\\DAV\\Files\\BrowserErrorPagePlugin","type":"->","args":[{"__class__":"Sabre\\DAV\\Exception"}]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"OCA\\DAV\\Files\\BrowserErrorPagePlugin"},"logException"],[{"__class__":"Sabre\\DAV\\Exception"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":259,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["exception",[{"__class__":"Sabre\\DAV\\Exception"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php","line":82,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/remote.php","line":165,"args":["/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":144,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36","version":"18.0.4.2"} {"reqId":"XqIMjvSGOMa0yvHRtHpndwAAAB0","level":3,"time":"2020-04-23T23:45:50+02:00","remoteAddr":"77.119.253.32","user":"andrfrag","app":"no app in context","method":"GET","url":"/remote.php/webdav/G%3A%20(zentrale)","message":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"photos.page.index\" as such route does not exist.","Code":0,"Trace":[{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Route/Router.php","line":339,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->","args":["photos.page.index",[],1]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/URLGenerator.php","line":82,"function":"generate","class":"OC\\Route\\Router","type":"->","args":["photos.page.index",[]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/NavigationManager.php","line":293,"function":"linkToRoute","class":"OC\\URLGenerator","type":"->","args":["photos.page.index"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/NavigationManager.php","line":114,"function":"init","class":"OC\\NavigationManager","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/theming/lib/ThemingDefaults.php","line":182,"function":"getAll","class":"OC\\NavigationManager","type":"->","args":["guest"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/public/Defaults.php","line":160,"function":"getShortFooter","class":"OCA\\Theming\\ThemingDefaults","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Template/JSConfigHelper.php","line":284,"function":"getShortFooter","class":"OCP\\Defaults","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/TemplateLayout.php","line":190,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/legacy/template.php","line":184,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["guest","core"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/lib/Files/BrowserErrorPagePlugin.php","line":107,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/lib/Files/BrowserErrorPagePlugin.php","line":84,"function":"generateBody","class":"OCA\\DAV\\Files\\BrowserErrorPagePlugin","type":"->","args":[500]},{"function":"logException","class":"OCA\\DAV\\Files\\BrowserErrorPagePlugin","type":"->","args":[{"__class__":"Sabre\\DAV\\Exception"}]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"OCA\\DAV\\Files\\BrowserErrorPagePlugin"},"logException"],[{"__class__":"Sabre\\DAV\\Exception"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":259,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["exception",[{"__class__":"Sabre\\DAV\\Exception"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php","line":82,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/remote.php","line":165,"args":["/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":144,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36","version":"18.0.4.2"} {"reqId":"XqIMjvSGOMa0yvHRtHpndwAAAB0","level":3,"time":"2020-04-23T23:45:50+02:00","remoteAddr":"77.119.253.32","user":"andrfrag","app":"no app in context","method":"GET","url":"/remote.php/webdav/G%3A%20(zentrale)","message":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"tasks.page.index\" as such route does not exist.","Code":0,"Trace":[{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Route/Router.php","line":339,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->","args":["tasks.page.index",[],1]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/URLGenerator.php","line":82,"function":"generate","class":"OC\\Route\\Router","type":"->","args":["tasks.page.index",[]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/NavigationManager.php","line":293,"function":"linkToRoute","class":"OC\\URLGenerator","type":"->","args":["tasks.page.index"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/NavigationManager.php","line":114,"function":"init","class":"OC\\NavigationManager","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/theming/lib/ThemingDefaults.php","line":182,"function":"getAll","class":"OC\\NavigationManager","type":"->","args":["guest"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/public/Defaults.php","line":160,"function":"getShortFooter","class":"OCA\\Theming\\ThemingDefaults","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Template/JSConfigHelper.php","line":284,"function":"getShortFooter","class":"OCP\\Defaults","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/TemplateLayout.php","line":190,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/legacy/template.php","line":184,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["guest","core"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/lib/Files/BrowserErrorPagePlugin.php","line":107,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/lib/Files/BrowserErrorPagePlugin.php","line":84,"function":"generateBody","class":"OCA\\DAV\\Files\\BrowserErrorPagePlugin","type":"->","args":[500]},{"function":"logException","class":"OCA\\DAV\\Files\\BrowserErrorPagePlugin","type":"->","args":[{"__class__":"Sabre\\DAV\\Exception"}]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"OCA\\DAV\\Files\\BrowserErrorPagePlugin"},"logException"],[{"__class__":"Sabre\\DAV\\Exception"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":259,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["exception",[{"__class__":"Sabre\\DAV\\Exception"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php","line":82,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/remote.php","line":165,"args":["/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":144,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36","version":"18.0.4.2"}

Server configuration

Operating system: Gentoo Linux

Web server: Apache 2.4.41

Database: MySQL 5.7.29

PHP version: PHP 7.2.29

Nextcloud version: (see Nextcloud admin page) 18.0.4

Updated from an older Nextcloud/ownCloud or fresh install: Updated from 18.0.3

Where did you install Nextcloud from: Official Website

Signing status:

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

List of activated apps:

App list ``` If you have access to your command line run e.g.: sudo -u www-data php occ app:list from within your Nextcloud installation folder `Enabled: - accessibility: 1.4.0 - activity: 2.11.0 - announcementcenter: 3.7.0 - browser_warning: 0.2.0 - bruteforcesettings: 1.6.0 - cloud_federation_api: 1.1.0 - comments: 1.8.0 - data_request: 1.5.0 - dav: 1.14.0 - deck: 0.8.2 - drawio: 0.9.5 - extract: 1.2.4 - federatedfilesharing: 1.8.0 - files: 1.13.1 - files_accesscontrol: 1.8.1 - files_external: 1.9.0 - files_inotify: 0.1.7 - files_mindmap: 0.0.21 - files_pdfviewer: 1.7.0 - files_rightclick: 0.15.2 - files_sharing: 1.10.1 - files_trashbin: 1.8.0 - files_versions: 1.11.0 - files_videoplayer: 1.7.0 - firstrunwizard: 2.7.0 - flowupload: 0.1.8 - groupquota: 0.1.2 - guests: 1.4.3 - impersonate: 1.5.0 - logreader: 2.3.0 - lookup_server_connector: 1.6.0 - nextcloud_announcements: 1.7.0 - notifications: 2.6.0 - oauth2: 1.6.0 - passwords: 2020.4.1 - photos: 1.0.0 - privacy: 1.2.0 - provisioning_api: 1.8.0 - quota_warning: 1.7.0 - ransomware_protection: 1.6.1 - recommendations: 0.6.0 - serverinfo: 1.8.0 - settings: 1.0.0 - sharebymail: 1.8.0 - socialsharing_email: 2.0.0 - spreed: 8.0.8 - support: 1.1.0 - tasks: 0.12.1 - text: 2.0.0 - theming: 1.9.0 - twofactor_backupcodes: 1.7.0 - updatenotification: 1.8.0 - user_ldap: 1.8.0 - user_usage_report: 1.2.0 - viewer: 1.2.0 - w2g2: 3.0.1 - workflowengine: 2.0.0 Disabled: - admin_audit - documentserver_community - encryption - external - federation - onlyoffice - password_policy - survey_client - systemtags `

Nextcloud configuration:

Config report ``` If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your Nextcloud installation folder or Insert your config.php content here. Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …) `{ "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "cloud.wienxtra.at" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "18.0.4.2", "overwrite.cli.url": "https:\/\/cloud.wienxtra.at", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "ldapIgnoreNamingRules": false, "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory", "mail_smtpmode": "sendmail", "mail_sendmailmode": "smtp", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "default_language": "de", "default_locale": "de_AT", "defaultapp": "files", "knowledgebaseenabled": true, "skeletondirectory": "\/lamp\/webspace\/cloud.wienxtra.at\/data\/skeleton", "htaccess.RewriteBase": "\/", "log_type": "file", "logfile": "\/lamp\/webspace\/cloud.wienxtra.at\/data\/nextcloud.log", "loglevel": 3, "logtimezone": "Europe\/Vienna", "log_rotate_size": 104857600, "enable_previews": true, "preview_max_x": 4096, "preview_max_y": 4096, "preview_max_filesize_image": 50, "preview_libreoffice_path": "\/usr\/bin\/libreoffice", "enabledPreviewProviders": { "0": "OC\\Preview\\PNG", "1": "OC\\Preview\\JPEG", "2": "OC\\Preview\\GIF", "4": "OC\\Preview\\BMP" }, "quota_include_external_storage": false, "external_storage.auth_availability_delay": 1800, "max_filesize_animated_gifs_public_sharing": 10, "login_form_autocomplete": false, "debug": false, "maintenance": false, "remember_login_cookie_lifetime": 86400, "session_lifetime": 36000, "updater.release.channel": "stable", "updater.secret": "***REMOVED SENSITIVE VALUE***" } } `

Are you using external storage, if yes which one: local/smb/sftp/... SMB from Windows Active Directory

Are you using encryption: yes/no No

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... ActiveDirectory

LDAP configuration (delete this part if not used)

LDAP config ``` With access to your command line run e.g.: sudo -u www-data php occ ldap:show-config from within your Nextcloud installation folder Without access to your command line download the data/owncloud.db to your local computer or access your SQL server remotely and run the select query: SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap'; Eventually replace sensitive data as the name/IP-address of your LDAP server or groups. ` +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | Configuration | s01 | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | hasMemberOfFilterSupport | 1 | | homeFolderNamingRule | attr:sAMAccountname | | lastJpegPhotoLookup | 0 | | ldapAgentName | CN=webapp-bind,OU=WEBZUGRIFF,DC=wienxtra,DC=intern | | ldapAgentPassword | *** | | ldapAttributesForGroupSearch | cn;name | | ldapAttributesForUserSearch | displayName;mail;sAMAccountname | | ldapBackupHost | | | ldapBackupPort | | | ldapBase | DC=wienxtra,DC=intern | | ldapBaseGroups | DC=wienxtra,DC=intern | | ldapBaseUsers | DC=wienxtra,DC=intern | | ldapCacheTTL | 600 | | ldapConfigurationActive | 1 | | ldapDefaultPPolicyDN | | | ldapDynamicGroupMemberURL | | | ldapEmailAttribute | mail | | ldapExperiencedAdmin | 0 | | ldapExpertUUIDGroupAttr | | | ldapExpertUUIDUserAttr | objectguid | | ldapExpertUsernameAttr | sAMAccountname | | ldapExtStorageHomeAttribute | | | ldapGidNumber | gidNumber | | ldapGroupDisplayName | cn | | ldapGroupFilter | (&(|(objectclass=group))(|(cn=cloud.wienxtra.at))) | | ldapGroupFilterGroups | cloud.wienxtra.at | | ldapGroupFilterMode | 0 | | ldapGroupFilterObjectclass | group | | ldapGroupMemberAssocAttr | member | | ldapHost | wx-admin1r.wienxtra.intern | | ldapIgnoreNamingRules | | | ldapLoginFilter | (&(&(|(objectclass=person))(|(|(memberof=CN=cloud.wienxtra.at,OU=WEBZUGRIFF,DC=wienxtra,DC=intern)(primaryGroupID=31263))))(samaccountname=%uid)) | | ldapLoginFilterAttributes | | | ldapLoginFilterEmail | 0 | | ldapLoginFilterMode | 1 | | ldapLoginFilterUsername | 1 | | ldapNestedGroups | 1 | | ldapOverrideMainServer | | | ldapPagingSize | 500 | | ldapPort | 389 | | ldapQuotaAttribute | | | ldapQuotaDefault | | | ldapTLS | 0 | | ldapUserAvatarRule | default | | ldapUserDisplayName | displayname | | ldapUserDisplayName2 | mail | | ldapUserFilter | (&(|(objectclass=person))(|(|(memberof=CN=cloud.wienxtra.at,OU=WEBZUGRIFF,DC=wienxtra,DC=intern)(primaryGroupID=31263)))) | | ldapUserFilterGroups | cloud.wienxtra.at | | ldapUserFilterMode | 0 | | ldapUserFilterObjectclass | person | | ldapUuidGroupAttribute | auto | | ldapUuidUserAttribute | auto | | turnOffCertCheck | 0 | | turnOnPasswordChange | 0 | | useMemberOfToDetectMembership | 1 | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ `

Client configuration

Browser: Most recent Firefox and most recent Google Chrome

Operating system: Windows 10 Pro 64 Bit

Logs

Web server error log

Web server error log ``` no errors in webserver log ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` {"reqId":"XqIMjvSGOMa0yvHRtHpndwAAAB0","level":4,"time":"2020-04-23T23:45:50+02:00","remoteAddr":"77.119.253.32","user":"andrfrag","app":"webdav","method":"GET","url":"/remote.php/webdav/G%3A%20(zentrale)","message":{"Exception":"Sabre\\DAV\\Exception","Message":"Invalid request for / (InvalidTypeException)","Code":0,"Trace":[{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/lib/Connector/Sabre/File.php","line":418,"function":"convertToSabreException","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[{"__class__":"Icewind\\SMB\\Exception\\InvalidTypeException"}]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[]},{"function":"httpGet","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https://cloud.wienxtra.at/remote.php/webdav/G%3A%20(zentrale)","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpGet"],[{"absoluteUrl":"https://cloud.wienxtra.at/remote.php/webdav/G%3A%20(zentrale)","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:GET",[{"absoluteUrl":"https://cloud.wienxtra.at/remote.php/webdav/G%3A%20(zentrale)","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https://cloud.wienxtra.at/remote.php/webdav/G%3A%20(zentrale)","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php","line":82,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/remote.php","line":165,"args":["/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/lib/Connector/Sabre/File.php","Line":659,"Previous":{"Exception":"Icewind\\SMB\\Exception\\InvalidTypeException","Message":"Invalid request for / (InvalidTypeException)","Code":21,"Trace":[{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php","line":66,"function":"fromMap","class":"Icewind\\SMB\\Exception\\Exception","type":"::","args":[{"1":"Icewind\\SMB\\Exception\\ForbiddenException","2":"Icewind\\SMB\\Exception\\NotFoundException","13":"Icewind\\SMB\\Exception\\ForbiddenException","16":"Icewind\\SMB\\Exception\\FileInUseException","17":"Icewind\\SMB\\Exception\\AlreadyExistsException","20":"Icewind\\SMB\\Exception\\InvalidTypeException","21":"Icewind\\SMB\\Exception\\InvalidTypeException","22":"Icewind\\SMB\\Exception\\InvalidArgumentException","28":"Icewind\\SMB\\Exception\\OutOfSpaceException","39":"Icewind\\SMB\\Exception\\NotEmptyException","103":"Icewind\\SMB\\Exception\\ConnectionAbortedException","104":"Icewind\\SMB\\Exception\\ConnectionResetException","110":"Icewind\\SMB\\Exception\\TimedOutException","111":"Icewind\\SMB\\Exception\\ConnectionRefusedException","112":"Icewind\\SMB\\Exception\\HostDownException","113":"Icewind\\SMB\\Exception\\NoRouteToHostException"},21,"/"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php","line":78,"function":"handleError","class":"Icewind\\SMB\\Native\\NativeState","type":"->","args":["/"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php","line":212,"function":"testResult","class":"Icewind\\SMB\\Native\\NativeState","type":"->","args":[false,"smb://wx-ztdc1s/default/"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php","line":263,"function":"open","class":"Icewind\\SMB\\Native\\NativeState","type":"->","args":["smb://wx-ztdc1s/default/","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/files_external/lib/Lib/Storage/SMB.php","line":416,"function":"read","class":"Icewind\\SMB\\Native\\NativeShare","type":"->","args":["/"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Files/Storage/Wrapper/Wrapper.php","line":299,"function":"fopen","class":"OCA\\Files_External\\Lib\\Storage\\SMB","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Files/Storage/Wrapper/PermissionsMask.php","line":122,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Files/Storage/Wrapper/Wrapper.php","line":299,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\PermissionsMask","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Files/Storage/Wrapper/PermissionsMask.php","line":122,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Files/Storage/Wrapper/Wrapper.php","line":299,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\PermissionsMask","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Files/Storage/Wrapper/Availability.php","line":314,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Files/Storage/Wrapper/Wrapper.php","line":299,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Availability","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/files_accesscontrol/lib/StorageWrapper.php","line":325,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/ransomware_protection/lib/StorageWrapper.php","line":317,"function":"fopen","class":"OCA\\FilesAccessControl\\StorageWrapper","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Files/View.php","line":1160,"function":"fopen","class":"OCA\\RansomwareProtection\\StorageWrapper","type":"->","args":["","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Files/View.php","line":996,"function":"basicOperation","class":"OC\\Files\\View","type":"->","args":["fopen","/G: (zentrale)",["read"],"r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/lib/Connector/Sabre/File.php","line":416,"function":"fopen","class":"OC\\Files\\View","type":"->","args":["G: (zentrale)","r"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[]},{"function":"httpGet","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https://cloud.wienxtra.at/remote.php/webdav/G%3A%20(zentrale)","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpGet"],[{"absoluteUrl":"https://cloud.wienxtra.at/remote.php/webdav/G%3A%20(zentrale)","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:GET",[{"absoluteUrl":"https://cloud.wienxtra.at/remote.php/webdav/G%3A%20(zentrale)","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https://cloud.wienxtra.at/remote.php/webdav/G%3A%20(zentrale)","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php","line":82,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/remote.php","line":165,"args":["/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php","Line":30},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36","version":"18.0.4.2"} {"reqId":"XqIMjvSGOMa0yvHRtHpndwAAAB0","level":3,"time":"2020-04-23T23:45:50+02:00","remoteAddr":"77.119.253.32","user":"andrfrag","app":"PHP","method":"GET","url":"/remote.php/webdav/G%3A%20(zentrale)","message":"Undefined index: debugMode at /lamp/webspace/cloud.wienxtra.at/htdocs/core/templates/exception.php#17","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36","version":"18.0.4.2"} {"reqId":"XqIMjvSGOMa0yvHRtHpndwAAAB0","level":3,"time":"2020-04-23T23:45:50+02:00","remoteAddr":"77.119.253.32","user":"andrfrag","app":"PHP","method":"GET","url":"/remote.php/webdav/G%3A%20(zentrale)","message":"Undefined index: debugMode at /lamp/webspace/cloud.wienxtra.at/htdocs/core/templates/exception.php#26","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36","version":"18.0.4.2"} {"reqId":"XqIMjvSGOMa0yvHRtHpndwAAAB0","level":3,"time":"2020-04-23T23:45:50+02:00","remoteAddr":"77.119.253.32","user":"andrfrag","app":"no app in context","method":"GET","url":"/remote.php/webdav/G%3A%20(zentrale)","message":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"passwords.page.index\" as such route does not exist.","Code":0,"Trace":[{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Route/Router.php","line":339,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->","args":["passwords.page.index",[],1]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/URLGenerator.php","line":82,"function":"generate","class":"OC\\Route\\Router","type":"->","args":["passwords.page.index",[]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/NavigationManager.php","line":293,"function":"linkToRoute","class":"OC\\URLGenerator","type":"->","args":["passwords.page.index"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/NavigationManager.php","line":114,"function":"init","class":"OC\\NavigationManager","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/theming/lib/ThemingDefaults.php","line":182,"function":"getAll","class":"OC\\NavigationManager","type":"->","args":["guest"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/public/Defaults.php","line":160,"function":"getShortFooter","class":"OCA\\Theming\\ThemingDefaults","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Template/JSConfigHelper.php","line":284,"function":"getShortFooter","class":"OCP\\Defaults","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/TemplateLayout.php","line":190,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/legacy/template.php","line":184,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["guest","core"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/lib/Files/BrowserErrorPagePlugin.php","line":107,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/lib/Files/BrowserErrorPagePlugin.php","line":84,"function":"generateBody","class":"OCA\\DAV\\Files\\BrowserErrorPagePlugin","type":"->","args":[500]},{"function":"logException","class":"OCA\\DAV\\Files\\BrowserErrorPagePlugin","type":"->","args":[{"__class__":"Sabre\\DAV\\Exception"}]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"OCA\\DAV\\Files\\BrowserErrorPagePlugin"},"logException"],[{"__class__":"Sabre\\DAV\\Exception"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":259,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["exception",[{"__class__":"Sabre\\DAV\\Exception"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php","line":82,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/remote.php","line":165,"args":["/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":144,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36","version":"18.0.4.2"} {"reqId":"XqIMjvSGOMa0yvHRtHpndwAAAB0","level":3,"time":"2020-04-23T23:45:50+02:00","remoteAddr":"77.119.253.32","user":"andrfrag","app":"no app in context","method":"GET","url":"/remote.php/webdav/G%3A%20(zentrale)","message":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"photos.page.index\" as such route does not exist.","Code":0,"Trace":[{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Route/Router.php","line":339,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->","args":["photos.page.index",[],1]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/URLGenerator.php","line":82,"function":"generate","class":"OC\\Route\\Router","type":"->","args":["photos.page.index",[]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/NavigationManager.php","line":293,"function":"linkToRoute","class":"OC\\URLGenerator","type":"->","args":["photos.page.index"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/NavigationManager.php","line":114,"function":"init","class":"OC\\NavigationManager","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/theming/lib/ThemingDefaults.php","line":182,"function":"getAll","class":"OC\\NavigationManager","type":"->","args":["guest"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/public/Defaults.php","line":160,"function":"getShortFooter","class":"OCA\\Theming\\ThemingDefaults","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Template/JSConfigHelper.php","line":284,"function":"getShortFooter","class":"OCP\\Defaults","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/TemplateLayout.php","line":190,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/legacy/template.php","line":184,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["guest","core"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/lib/Files/BrowserErrorPagePlugin.php","line":107,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/lib/Files/BrowserErrorPagePlugin.php","line":84,"function":"generateBody","class":"OCA\\DAV\\Files\\BrowserErrorPagePlugin","type":"->","args":[500]},{"function":"logException","class":"OCA\\DAV\\Files\\BrowserErrorPagePlugin","type":"->","args":[{"__class__":"Sabre\\DAV\\Exception"}]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"OCA\\DAV\\Files\\BrowserErrorPagePlugin"},"logException"],[{"__class__":"Sabre\\DAV\\Exception"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":259,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["exception",[{"__class__":"Sabre\\DAV\\Exception"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php","line":82,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/remote.php","line":165,"args":["/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":144,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36","version":"18.0.4.2"} {"reqId":"XqIMjvSGOMa0yvHRtHpndwAAAB0","level":3,"time":"2020-04-23T23:45:50+02:00","remoteAddr":"77.119.253.32","user":"andrfrag","app":"no app in context","method":"GET","url":"/remote.php/webdav/G%3A%20(zentrale)","message":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"tasks.page.index\" as such route does not exist.","Code":0,"Trace":[{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Route/Router.php","line":339,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->","args":["tasks.page.index",[],1]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/URLGenerator.php","line":82,"function":"generate","class":"OC\\Route\\Router","type":"->","args":["tasks.page.index",[]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/NavigationManager.php","line":293,"function":"linkToRoute","class":"OC\\URLGenerator","type":"->","args":["tasks.page.index"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/NavigationManager.php","line":114,"function":"init","class":"OC\\NavigationManager","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/theming/lib/ThemingDefaults.php","line":182,"function":"getAll","class":"OC\\NavigationManager","type":"->","args":["guest"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/public/Defaults.php","line":160,"function":"getShortFooter","class":"OCA\\Theming\\ThemingDefaults","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/Template/JSConfigHelper.php","line":284,"function":"getShortFooter","class":"OCP\\Defaults","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/TemplateLayout.php","line":190,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/lib/private/legacy/template.php","line":184,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["guest","core"]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/lib/Files/BrowserErrorPagePlugin.php","line":107,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/lib/Files/BrowserErrorPagePlugin.php","line":84,"function":"generateBody","class":"OCA\\DAV\\Files\\BrowserErrorPagePlugin","type":"->","args":[500]},{"function":"logException","class":"OCA\\DAV\\Files\\BrowserErrorPagePlugin","type":"->","args":[{"__class__":"Sabre\\DAV\\Exception"}]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"OCA\\DAV\\Files\\BrowserErrorPagePlugin"},"logException"],[{"__class__":"Sabre\\DAV\\Exception"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":259,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["exception",[{"__class__":"Sabre\\DAV\\Exception"}]]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php","line":82,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/lamp/webspace/cloud.wienxtra.at/htdocs/remote.php","line":165,"args":["/lamp/webspace/cloud.wienxtra.at/htdocs/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/lamp/webspace/cloud.wienxtra.at/htdocs/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":144,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36","version":"18.0.4.2"} ```

Browser log

Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
kesselb commented 4 years ago

cc @icewind1991 @rullzer

tofazzz commented 4 years ago

Same issue here:

Server configuration Operating system: FreeBSD 12.1

Web server: Apache 2.4.43

Database: MariaDB 10.4.12

PHP version: PHP 7.4.5

Nextcloud version: (see Nextcloud admin page) 18.0.4

Updated from an older Nextcloud/ownCloud or fresh install: Updated from 18.0.3

Where did you install Nextcloud from: FreeBSD package manager

Itay1787 commented 4 years ago

+1

Itay1787 commented 4 years ago

Is there an ETA when will the problem be fixed? I don't know PHP or anything like that so I can only hope that other people understand why this is the case and fix it

Itay1787 commented 4 years ago

I found a temporary fix!!!! Download the previous version of NextCloud from the site (18.0.3) And move from the version (18.0.3) the apps/files_external to the 18.0.4 folder simply override the files there within apps/files_external For me at least right now, fix the problem I have SMB access again. Hope I explained it properly English is not my main language

tofazzz commented 4 years ago

I found a temporary fix!!!! Download the previous version of NextCloud from the site (18.0.3) And move from the version (18.0.3) the apps/files_external to the 18.0.4 folder simply override the files there within apps/files_external For me at least right now, fix the problem I have SMB access again. Hope I explained it properly English is not my main language

Thank you for reporting the fix and it works for me as well! So now should we wait a fix for Nextcloud core or just the external storage app? Hopefully soon because it is a PITA loosing access to folders that users are using a lot.

Itay1787 commented 4 years ago

opefully soon because it is a PITA loosing access to folders that users are using a lot.

Yes I understand you very much! I now have to wait for a fix because I still have folders that it doesn't read properly!!! It really sucks!!!!

BigDogJonx commented 4 years ago

I can confirm this happens even on a fresh install of 18.0.4, so just reporting its not due to upgrade alone.

mashiro-mikage commented 4 years ago

I found a temporary fix!!!! Download the previous version of NextCloud from the site (18.0.3) And move from the version (18.0.3) the apps/files_external to the 18.0.4 folder simply override the files there within apps/files_external For me at least right now, fix the problem I have SMB access again. Hope I explained it properly English is not my main language

I temporary fix it at 19.0.0 beta 5 using the same method. Do not replace all of files_external. Only replaced

after replace, restart php-fpm and nginx

BigDogJonx commented 4 years ago

Im not an expert linux user but i know enough commands to mess around with it and SCP files here. I know to access the /var/www/nextcloud you need to issue a sudo -i but I cannot figure out how to get WinSCP to copy files out of that nextcloud directory (since i cant even access it) so i can try what @mashiro-mikage mentioned above.

theroch commented 4 years ago

Same issue here. Updated from 18.0.3.0 to 18.0.4.0.

My workaround was: Do not replace all of files_external.

Only replace apps/files_external/3rdparty/icewind with backup from data/updater-[instance]/backups/nextcloud-18.0.3.0/apps/files_external/3rdparty/icewind

after replace, restart php if you use fpm or apache if you use mod-php

theroch commented 4 years ago

It seems this bug is related to a specific software version or configuration!

We have one Ubuntu Server 16.04 with php 7.3 and Nextcloud 18.0.4 where the smb shares are working properly. The highest SMB protocol version in use is SMB2_10

The other server is Ubuntu Server 18.04 with php 7.2 and Nextcloud 18.0.4 where the smb shares are not working. The highest SMB protocol version in use is SMB3_11

Maybe it's either the PHP version or the SMB protocol used?

mjanssens commented 4 years ago

Maybe it's either the PHP version or the SMB protocol used?

Spinning a bit further on your comment. Perhaps that's a direction. I don't have any issues reaching an external SMB share on Debian 10.3 with PHP 7.3.14. But I also have both smbclient and php-smbclient packages installed as advised in https://docs.nextcloud.com/server/18/admin_manual/configuration_files/external_storage/smb.html

zero0cool0 commented 4 years ago

Can anyone else confirm that this error is only happening if the remote subfolder in the settings for external storage is not empty? If I leave this blank, the external storage works for me. When I fill in an existing remote subfolder, I see the same errors as mentioned above.

theroch commented 4 years ago

I've limited the smb protocol to smb2_10 and restarted php and smb but the share is not accessible with Icewind SMB 3.2.3. So it seems to be not the smb protocol version!

smbclient v4.10.15 and php-smbclient v0.8.0 are installed too on the non working server, there's has nothing changed since nextcloud 18.0.3.

On the working server with Ubuntu 16.04 smbclient 4.3.11 and php-smbclient 1.0.0 is installed. Maybe the problem is related to php-smbclient there was a fix in v0.9.0 for smbclient_read? I will try to install php-smbclient 1.0.0.

Update 1: I've installed latest 1.0.0 from pecl, same error. It is not caused by php-smbclient.

Update 2: Installed php7.4, same error.

I think the only difference now is the underlying samba version!? But this is a little bit tricky to test for me. Does anyone else have a working nextcloud 18.0.4 running with a samba version newer than 4.3.11?

theroch commented 4 years ago

I've written a little snippet which is using the low level php functions from php-smbclient. This functions are working correct. But I can reproduce the error 21 "Invalid type" if I try to open a directory with smbclient_open.

So I've looked a little bit deeper into the code from nextcloud, I think the problem is caused by

"file":"/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
                    "line":85,
                    "function":"get",
                    "class":"OCA\\DAV\\Connector\\Sabre\\File",
                    "type":"->"

This functions returns in line 81:

$node = $this->server->tree->getNodeForPath($path);

a file node instead of an directory node.

Update 1: After some debugging I know the function calls differs completly between the icewind lib used in nextcloud 18.0.3 and 18.0.4: With icewind from 18.0.3 only the httpPropFind from 3rdparty/sabre/dav/lib/DAV/CorePlugin.php is called if you will access the smb share. With icewind from 18.0.4 the httpGet is called.

mjanssens commented 4 years ago

Does anyone else have a working nextcloud 18.0.4 running with a samba version newer than 4.3.11?

Working nextcloud 18.0.4 on debian 10.3 Samba 4.9.5, php-smbclient 0.9.0 The samba share I connect to on different server also has debian 10.3, samba 4.9.5

theroch commented 4 years ago

I've found the problem on my system! The problem is caused by apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php in the isDirectory method. The mode for my directory is always 0x41ed (16877). The bit operation with 0x10 (for directory) in the new icewind lib is therfore always 0. If I use the old method !(0x41ed & 0x8000) all is working again correct.

Try this fix in isDirectory Line 112: return !(bool)($mode & 0100000);

But why differs the mode on some systems so that is this working there? I will test it on my other system where this bug not exists.

Update 1: The mode on a the running system is set to 0x10 (16). On the non working system the mode is set to 0x41ed (16877) The mode is read with this code: smbclient_getxattr($state, $uri, 'system.dos_attr.*');

You can test your mode with the following code:

<?php
$workgroup ='your workgroup or domain';
$user           ='your user';
$pwd           = 'your secret password';
$uri             = 'smb://your.server.local/share';
// Create new state:
$state = smbclient_state_new();
// Initialize the state with workgroup, username and password:
smbclient_state_init($state, $workgroup, $user, $pwd);

$attr = @smbclient_getxattr($state, $uri, 'system.dos_attr.*');
var_dump($attr);

Can anybody with this problem run this snippet and paste your result here?

N3viden commented 4 years ago

I am also experiencing the exact same issue, will try some of the suggested solutions.

BigDogJonx commented 4 years ago

@theroch not fully following you on the line 112. Mine doesnt look anywhere near that.
Here is that section off mine:

   public function isDirectory() {
                $mode = $this->getMode();
                return (bool)($mode & IFileInfo::MODE_DIRECTORY);
        }

Here is that same portion of the code off my 18.0.3 system that is working

        public function isDirectory() {
                $stat = $this->stat();
                return !($stat['mode'] & self::MODE_FILE);
        }

Tried to run that code and I got the following:

root@xxxx:/var/www/nextcloud# php test.php
PHP Fatal error:  Uncaught Error: Call to undefined function smbclient_state_new() in /var/www/nextcloud/test.php:7
Stack trace:
#0 {main}
  thrown in /var/www/nextcloud/test.php on line 7
theroch commented 4 years ago

@BigDogJonx

Tried to run that code and I got the following:

root@xxxx:/var/www/nextcloud# php test.php
PHP Fatal error:  Uncaught Error: Call to undefined function smbclient_state_new() in /var/www/nextcloud/test.php:7
Stack trace:
#0 {main}
  thrown in /var/www/nextcloud/test.php on line 7

Did you install libsmbclient-php and have you enabled it for cli?

not fully following you on the line 112. Mine doesnt look anywhere near that. Here is that section off mine:

I don't understand you? This code is the native one from 18.0.4. It starts at line 110 and ends at line 113:

        public function isDirectory() {
                $mode = $this->getMode();
                return (bool)($mode & IFileInfo::MODE_DIRECTORY);
        }

see source here

You have to modify this code to the following if you are affected:

        public function isDirectory() {
                $mode = $this->getMode();
                return !(bool)($mode & 0x8000);
        }

Hope that helps

aquilaxx commented 4 years ago

Neither using the folder from files_external from 10.3 still replacing this section

return !(bool)($mode & 0x20);

helps for me.

I'm using ubuntu 18.04.4 LTS (patched), php v7.3.17

I'm gettin this:

`[webdav] Fatal: Sabre\DAV\Exception: Invalid request for /Cloud (InvalidTypeException) at <>

  1. /var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 418 OCA\DAV\Connector\Sabre\File->convertToSabreException(Icewind\SMB\Exce ... {})
  2. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 85 OCA\DAV\Connector\Sabre\File->get()
  3. <> Sabre\DAV\CorePlugin->httpGet(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  4. /var/www/html/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105 call_user_func_array([Sabre\DAV\CorePlugin {},"httpGet"], [Sabre\HTTP\Requ ... }])
  5. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479 Sabre\Event\EventEmitter->emit("method:GET", [Sabre\HTTP\Requ ... }])
  6. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254 Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  7. /var/www/html/nextcloud/apps/dav/appinfo/v1/webdav.php line 82 Sabre\DAV\Server->exec()
  8. /var/www/html/nextcloud/remote.php line 165 require_once("/var/www/html/n ... p")

GET /remote.php/webdav/Cloud`

Any other ideas?

theroch commented 4 years ago

@aquilaxx My mistake I mixed up some values: try this one: return !(bool)($mode & 0x8000); it is the same as: return !(bool)($mode & 0100000); from 18.0.3

I've updated my other post.

aquilaxx commented 4 years ago

@theroch i changed it in /apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php to return !(bool)($mode & 0x8000);

the function now is:

public function isDirectory() { $mode = $this->getMode(); return !(bool)($mode & 0x8000);

but the problem still exists

theroch commented 4 years ago

@aquilaxx Did you restart your php or webserver?

aquilaxx commented 4 years ago

@theroch Yes!

theroch commented 4 years ago

@aquilaxx

Neither using the folder from files_external from 10.3 still replacing this section return !(bool)($mode & 0x20); helps for me.

Only to be sure, because you tried both: You have the clean code from 18.0.4 installed and made the modification in NativeFileInfo return !(bool)($mode & 0x8000); ?

Can you please post the value from $mode here? You can use the code from this comment.

theroch commented 4 years ago

@aquilaxx Maybe I've a solution for your problem. I've found one folder in my storage which wasn't accessible anymore too. My fix for isDirectory in NativeFileInfo works and the function returns correctly true, but the resulting node was a file node and not a directory node.

After some debugging I found the problem, it was caused by the oc_filecache!

First I tried to execute occ files:cleanup but this didn't help. Then I tried to fix the entries directly in the database. Because it was a directory I have to set mimetype to 2 and mimepart to 1 for all entries with the relevant path in the db. After this the directory was accessible again. Maybe you also have to check the permissions entries, or use the update with `storage_mtime' (see below).

Maybe it is also possible to run occ files:scan to update the filecache but I didn't test it because there was only one directory affected.

Stange is, nextcloud calls the function 'isDirectory' returns the correct value but drops this result and uses the old filecache entry instead.

The getCacheEntry in lib/private/Files/View.php checks only the file/directory modification date to update the file cache. So a other solution to update multiple affected files/diretories in the cache, is to modify the storage_mtime (modifing mtime doesn't work!) for all entries. So the file cache will be refreshed from nextcloud.

aquilaxx commented 4 years ago

My solution was to delete the smb mount point and reinstall it. :-) Thank you!

Hans-KNE commented 4 years ago

@theroch I have exactly the same problem. I've run your snippet and I also get 0x41ed for a directory. For a file I get 0x81e4. So, if I change the isDirectory() function to returning !(bool)($mode & 0x8000) then it works for me, too!

However, I think there must be a bug somewhere in the libsmbclient/libsmbclient-php libraries. The value 0x81e4/0x41ed does not correspond to the values defined in libsmbclient.h. smbc_getxattr() returns a combination of the following values for "system.dos_attr.*"

SMBC_DOS_MODE_READONLY       0x01
SMBC_DOS_MODE_HIDDEN         0x02
SMBC_DOS_MODE_SYSTEM         0x04
SMBC_DOS_MODE_VOLUME_ID      0x08
SMBC_DOS_MODE_DIRECTORY      0x10
SMBC_DOS_MODE_ARCHIVE        0x20

So, I would expect the 0x10 bit set for a directory.

cesardi commented 4 years ago

Reporting the same problem in FreeBSD 12.1-RELEASE-p3 after an update. Rebuilding all from ports now just in case.

DerPi3141 commented 4 years ago

The same issue on Nextcloud 18.04 Ubuntu Server 20.04 LTS Kernel 5.4.0-29-generic with installed libsmbclient 2:4.11.6

wiswedel commented 4 years ago

@icewind1991 something wrong with your latest changes? CC @rullzer

icewind1991 commented 4 years ago

It seems that some versions of smbclient 4.10/4.11 (and maybe further backports in some distros) changed the mode returned.

Can somebody try the following patch and see if it works for them: https://github.com/icewind1991/SMB/commit/927e330901cf7d1323937a2e77e6d542fe9cd894

Hans-KNE commented 4 years ago

@icewind1991 I've applied the patch. It does not work for me. The value for $mode (for a directory) on my system is 0x41ed. So, the resulting value of !(bool)($mode & 0x80) is false(in the isDirectory() function).

The workaround that worked for me was to return !(bool)($mode & 0x8000).

theroch commented 4 years ago

@Hans-KNE After looking into the source of php-libsmbclient, I don't think it is related to this one because this lib gives the input only to the underlying libsmbclient functions. I confirm with @icewind1991, I think it is related to libsmbclient too.

I've discussed this issue also in the offical #samba irc chat, but nobody was able to help. libsmbclient.h is not the correct file to look to, it is libcli/smb/smb_constants.h from line 326 on (Someone from #samba told me). This definitions are equal to the offical Microsoft one.

FILE_ATTRIBUTE_READONLY     0x0001L
FILE_ATTRIBUTE_HIDDEN       0x0002L
FILE_ATTRIBUTE_SYSTEM       0x0004L
FILE_ATTRIBUTE_VOLUME       0x0008L
FILE_ATTRIBUTE_DIRECTORY    0x0010L
FILE_ATTRIBUTE_ARCHIVE      0x0020L
FILE_ATTRIBUTE_DEVICE       0x0040L
FILE_ATTRIBUTE_NORMAL       0x0080L
FILE_ATTRIBUTE_TEMPORARY    0x0100L
FILE_ATTRIBUTE_SPARSE       0x0200L
FILE_ATTRIBUTE_REPARSE_POINT    0x0400L
FILE_ATTRIBUTE_COMPRESSED   0x0800L
FILE_ATTRIBUTE_OFFLINE      0x1000L
FILE_ATTRIBUTE_NONINDEXED   0x2000L
FILE_ATTRIBUTE_ENCRYPTED    0x4000L
FILE_ATTRIBUTE_ALL_MASK     0x7FFFL

But also with this info the resulting 0x41ed makes no sense.

theroch commented 4 years ago

@Hans-KNE

@icewind1991 I've applied the patch. It does not work for me. The value for $mode (for a directory) on my system is 0x41ed. So, the resulting value of !(bool)($mode & 0x80) is false(in the isDirectory() function).

The workaround that worked for me was to return !(bool)($mode & 0x8000).

Did you apply the patch correctly? The code in the patch for isDirectory is not return !(bool)($mode & 0x80) it is return (bool)($mode & 0x4000) and that is for 0x41ed & 0x4000 = 0x4000 correct.

Hans-KNE commented 4 years ago

@theroch @icewind1991 Sorry! My fault! I did not apply the patch correctly. After applying the patch again, it now works for me!

theroch commented 4 years ago

According to @icewind1991 the unix permission masks are returned in newer samba versions: You can test this with: stat -c '%A %f' [your directory name] this will print the unix-mode in octal and in hex format.

Schleichmichl commented 4 years ago

Just want to confirm. I have the same bug after upgrade to 18.0.4.

kesselb commented 4 years ago

@Schleichmichl Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.

enoch85 commented 4 years ago

@icewind1991 I just want to confirm that cloning the whole smb folder in your repo, and replacing it with the old, solved this bug. At least for me.

Please add this in the next maintenance release.

TomGem commented 4 years ago

As this is the first (and luckily helpful, too) search result on this topic a really short summary;

Today I updated to 18.0.4, had this problem and https://github.com/nextcloud/server/issues/20622#issuecomment-626710407 solved it.

altae7 commented 4 years ago

The patch by @icewind1991 restored my access to external smb shares. Thank you very much for that. But now I have the following repeating error in the nextcloud log:

Uninitialized string offset: 0 at /config/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php#144

Is this something I can ignore (access to external smb shares works)?

midnight-pm commented 4 years ago

@Hans-KNE, I also tried the patch provided in this comment. Like yourself, this proved to also be unsuccessful for me.

Accordingly, I did this:

       public function isDirectory() {
                $mode = $this->getMode();
                if ($mode > 0x80) {
                        return (bool)($mode & 0x4000); // 0x80: unix directory flag
                } elseif ($mode === 0x41ed) {
                        return (bool)($mode & 0x8000); // HOT FIX 2020-05-26 0005 -- https://github.com/nextcloud/server/issues/20622#issuecomment-626724137
                } else {
                        return (bool)($mode & IFileInfo::MODE_DIRECTORY);
                }
        }

To show the comparison to NativeFileInfo.php as is present in release 18.0.4 of Nextcloud, the diff is presented below:

$ diff NativeFileInfo.php NativeFileInfo.php.orig
34a35,39
>        * @var int
>        */
>       protected $modeCache;
>
>       /**
96,107d100
<        * On "mode":
<        *
<        * different smbclient versions seem to return different mode values for 'system.dos_attr.mode'
<        *
<        * older versions return the dos permissions mask as defined in `IFileInfo::MODE_*` while
<        * newer versions return the equivalent unix permission mask.
<        *
<        * Since the unix mask doesn't contain the proper hidden/archive/system flags we have to assume them
<        * as false (except for `hidden` where we use the unix dotfile convention)
<        */
<
<       /**
119,125c112
<               if ($mode > 0x80) {
<                       return (bool)($mode & 0x4000); // 0x80: unix directory flag
<               } elseif ($mode === 0x41ed) {
<                       return (bool)($mode & 0x8000); // HOT FIX 2020-05-26 0005 -- https://github.com/nextcloud/server/issues/20622#issuecomment-626724137
<               } else {
<                       return (bool)($mode & IFileInfo::MODE_DIRECTORY);
<               }
---
>               return (bool)($mode & IFileInfo::MODE_DIRECTORY);
133,137c120
<               if ($mode > 0x80) {
<                       return !(bool)($mode & 0x80); // 0x80: owner write permissions
<               } else {
<                       return (bool)($mode & IFileInfo::MODE_READONLY);
<               }
---
>               return (bool)($mode & IFileInfo::MODE_READONLY);
145,149c128
<               if ($mode > 0x80) {
<                       return $this->name[0] === '.';
<               } else {
<                       return (bool)($mode & IFileInfo::MODE_HIDDEN);
<               }
---
>               return (bool)($mode & IFileInfo::MODE_HIDDEN);
157,161c136
<               if ($mode > 0x80) {
<                       return false;
<               } else {
<                       return (bool)($mode & IFileInfo::MODE_SYSTEM);
<               }
---
>               return (bool)($mode & IFileInfo::MODE_SYSTEM);
169,173c144
<               if ($mode > 0x80) {
<                       return false;
<               } else {
<                       return (bool)($mode & IFileInfo::MODE_ARCHIVE);
<               }
---
>               return (bool)($mode & IFileInfo::MODE_ARCHIVE);
194d164
<

This was successful.

Some Possibly Helpful Info:

$ php -v
PHP 7.3.18 (cli) (built: May 12 2020 08:04:33) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.18, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.18, Copyright (c) 1999-2018, by Zend Technologies

$ cat /etc/fedora-release
Fedora release 31 (Thirty One)

$ smbclient --version
Version 4.11.9
wiswedel commented 4 years ago

This will be fixed in 19.0.0, 18.0.5 and 17.0.7. Please see https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule for the release schedule.

altae7 commented 4 years ago

I tried the hot fix by @midnight-pm too and it also works. This one returns the same error but the problematic value seems to be on a different line in the file:

Error | PHP | Uninitialized string offset: 0 at /config/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php#289

Since it's a hot fix and the next version of nextcloud which should resolve this issue is scheduled to be released soon I'll ignore the error messages in the log for the time being.

Again thanks to everybody who invested time into helping us out.

raspitoaster commented 4 years ago

I am affected by this issue after our NextCloud server was updated from samba 4.11.3 to samba 4.12.3 (using the samba-heimdal AUR workaround for the broken Archlinux samba 4.12.3 package). Applying the patch https://github.com/nextcloud/server/issues/20622#issuecomment-633800927 gives us back the SMB external storages. Deleting/recreating the shares was not neessary.

icewind1991 commented 4 years ago

I'll should have a fix for "Uninitialized string offset: 0" shortly

flipreverse commented 4 years ago

I am affected by this issue after our NextCloud server was updated from samba 4.11.3 to samba 4.12.3 (using the samba-heimdal AUR workaround for the broken Archlinux samba 4.12.3 package). Applying the patch #20622 (comment) gives us back the SMB external storages. Deleting/recreating the shares was not neessary.

This didn't work for my setup. :( Ubuntu 18.04 on Odroid C2, PHP 7.2.24-0ubuntu0.18.04.6, smbclient Version 4.7.6-Ubuntu, libsmbclient 2:4.7.6+dfsg~ubuntu-0ubuntu2.16

Even the simple script provided at the bottom of libsmbclient-php's README doesn't work. What kind of additional information can I provide?

EDIT: It was my fault. It works now. NC needs the workgroup of the respective SMB server.