Webdav invalid request error with samba share #22187

Closed
lhurt opened this Issue Feb 8, 2016 · 3 comments

Projects

None yet

4 participants

@lhurt
lhurt commented Feb 8, 2016

Server: Linux Ubuntu 15.10
Database: MySQL 5.6.28
Client: Windows 7 and 10
OC-Version: 8.2.2
PHP-Version: 5.6

Hi,
there are very frequent error messages in my owncloud.log that I can't explain. They are obviously from the webdav client and relate to the mounted smb shares in my main user. The Samba server is on the same machine.

They appear every couple of minutes and look like this

Loglevel: fatal
Source: webdav

Exception: {
"Message":
"Invalid request for smb:\/\/mediacenter\/ludwig\/",
"Exception":"Icewind\\SMB\\Exception\\ForbiddenException",
"Code":13,
"Trace":"#0
\/var\/www\/owncloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/NativeState.php(72):Icewind\\SMB\\NativeState->handleError('smb:\/\/mediacent...')\n#1
\/var\/www\/owncloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/NativeState.php(180): Icewind\\SMB\\NativeState->testResult(false, 'smb:\/\/mediacent...')\n#2
\/var\/www\/owncloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/NativeShare.php(105): Icewind\\SMB\\NativeState->stat('smb:\/\/mediacent...')\n#3
\/var\/www\/owncloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/NativeShare.php(100): Icewind\\SMB\\NativeShare->getStat('\/')\n#4
\/var\/www\/owncloud\/apps\/files_external\/lib\/smb.php(102): Icewind\\SMB\\NativeShare->stat('\/')\n#5 
\/var\/www\/owncloud\/apps\/files_external\/lib\/smb.php(272): OC\\Files\\Storage\\SMB->getFileInfo('')\n#6 
\/var\/www\/owncloud\/lib\/private\/files\/storage\/common.php(91): OC\\Files\\Storage\\SMB->filetype('')\n#7 
\/var\/www\/owncloud\/lib\/private\/files\/storage\/wrapper\/wrapper.php(99): OC\\Files\\Storage\\Common->is_dir('')\n#8 
\/var\/www\/owncloud\/lib\/private\/files\/storage\/wrapper\/availability.php(104): OC\\Files\\Storage\\Wrapper\\Wrapper->is_dir('')\n#9 
\/var\/www\/owncloud\/lib\/private\/files\/storage\/wrapper\/wrapper.php(99): OC\\Files\\Storage\\Wrapper\\Availability->is_dir('')\n#10 
\/var\/www\/owncloud\/lib\/private\/files\/storage\/wrapper\/wrapper.php(99): OC\\Files\\Storage\\Wrapper\\Wrapper->is_dir('')\n#11 
\/var\/www\/owncloud\/lib\/private\/files\/cache\/watcher.php(102): OC\\Files\\Storage\\Wrapper\\Wrapper->is_dir('')\n#12 
\/var\/www\/owncloud\/lib\/private\/files\/view.php(1207): OC\\Files\\Cache\\Watcher->update('', Array)\n#13 
\/var\/www\/owncloud\/lib\/private\/connector\/sabre\/objecttree.php(148): OC\\Files\\View->getFileInfo('_server_user')\n#14 
\/var\/www\/owncloud\/lib\/private\/connector\/sabre\/custompropertiesbackend.php(100): OC\\Connector\\Sabre\\ObjectTree->getNodeForPath('_server_user')\n#15
\/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/PropertyStorage\/Plugin.php(86): OC\\Connector\\Sabre\\CustomPropertiesBackend->propFind('_server_user', Object(Sabre\\DAV\\PropFind))\n#16
[internal function]: Sabre\\DAV\\PropertyStorage\\Plugin->propFind(Object(Sabre\\DAV\\PropFind), Object(OC\\Connector\\Sabre\\Directory))\n#17 
\/var\/www\/owncloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#18 
\/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(1016): Sabre\\Event\\EventEmitter->emit('propFind', Array)\n#19 
\/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(936): Sabre\\DAV\\Server->getPropertiesByNode(Object(Sabre\\DAV\\PropFind), Object(OC\\Connector\\Sabre\\Directory))\n#20
\/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(327): Sabre\\DAV\\Server->getPropertiesForPath('', Array, 1)\n#21
[internal function]: Sabre\\DAV\\CorePlugin->httpPropfind(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#22 
\/var\/www\/owncloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#23 
\/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(469): Sabre\\Event\\EventEmitter->emit('method:PROPFIND', Array)\n#24 
\/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#25
\/var\/www\/owncloud\/apps\/files\/appinfo\/remote.php(56): Sabre\\DAV\\Server->exec()\n#26
\/var\/www\/owncloud\/remote.php(137): require_once('\/var\/www\/ownclo...')\n#27
{main}",
"File":"\/var\/www\/owncloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/NativeState.php",
"Line":42}

It seems to lead to a broken synchronization with the Windows sync client. Sometimes it temporarily recovers. Sometimes it helps to pause and resume the sync process. Usually the sync status toggles between OK and broken.

@PVince81 PVince81 added this to the 9.0-current milestone Feb 8, 2016
@PVince81
Collaborator
PVince81 commented Feb 8, 2016

ForbiddenException, you might want to check the permissions of folders on your Windows share.

@lhurt
lhurt commented Feb 8, 2016

Hi,
there are some directories that are unaccessible for the user but in my point of view this shouldn't lead to a fatal error.

@PVince81 PVince81 added the sev2-high label Feb 12, 2016
@lhurt
lhurt commented Feb 12, 2016

Hi,
sorry for the delay but it took me some time to set up a test environment.

Errors are almost gone but I still get

{ "Message":"Invalid request for smb:\/\/localhost\/documents\/2012-09-25%20Fehlerbeschreibung%20Auto.docx (ForbiddenException)", "Exception":"Icewind\\SMB\\Exception\\ForbiddenException", "Code":13, "Trace":"#0 \/var\/www\/owncloud.dev\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/NativeState.php(72): Icewind\\SMB\\NativeState->handleError('smb:\/\/localhost...')\n#1 \/var\/www\/owncloud.dev\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/NativeState.php(180): Icewind\\SMB\\NativeState->testResult(false, 'smb:\/\/localhost...')\n#2 \/var\/www\/owncloud.dev\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/NativeShare.php(108): Icewind\\SMB\\NativeState->stat('smb:\/\/localhost...')\n#3 \/var\/www\/owncloud.dev\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/NativeShare.php(103): Icewind\\SMB\\NativeShare->getStat('\/2012-09-25 Feh...')\n#4 \/var\/www\/owncloud.dev\/apps\/files_external\/lib\/smb.php(110): Icewind\\SMB\\NativeShare->stat('\/2012-09-25 Feh...')\n#5 \/var\/www\/owncloud.dev\/apps\/files_external\/lib\/smb.php(144): OC\\Files\\Storage\\SMB->getFileInfo('2012-09-25 Fehl...')\n#6 \/var\/www\/owncloud.dev\/lib\/private\/files\/storage\/common.php(169): OC\\Files\\Storage\\SMB->stat('2012-09-25 Fehl...')\n#7 \/var\/www\/owncloud.dev\/apps\/files_external\/lib\/smb.php(181): OC\\Files\\Storage\\Common->filemtime('2012-09-25 Fehl...')\n#8 \/var\/www\/owncloud.dev\/lib\/private\/files\/storage\/wrapper\/wrapper.php(367): OC\\Files\\Storage\\SMB->hasUpdated('2012-09-25 Fehl...', 1348606389)\n#9 \/var\/www\/owncloud.dev\/lib\/private\/files\/storage\/wrapper\/availability.php(383): OC\\Files\\Storage\\Wrapper\\Wrapper->hasUpdated('2012-09-25 Fehl...', 1348606389)\n#10 \/var\/www\/owncloud.dev\/lib\/private\/files\/storage\/wrapper\/wrapper.php(367): OC\\Files\\Storage\\Wrapper\\Availability->hasUpdated('2012-09-25 Fehl...', 1348606389)\n#11 \/var\/www\/owncloud.dev\/lib\/private\/files\/storage\/wrapper\/wrapper.php(367): OC\\Files\\Storage\\Wrapper\\Wrapper->hasUpdated('2012-09-25 Fehl...', 1348606389)\n#12 \/var\/www\/owncloud.dev\/lib\/private\/files\/cache\/watcher.php(122): OC\\Files\\Storage\\Wrapper\\Wrapper->hasUpdated('2012-09-25 Fehl...', 1348606389)\n#13 \/var\/www\/owncloud.dev\/lib\/private\/files\/view.php(1239): OC\\Files\\Cache\\Watcher->needsUpdate('2012-09-25 Fehl...', Object(OC\\Files\\Cache\\CacheEntry))\n#14 \/var\/www\/owncloud.dev\/lib\/private\/files\/view.php(1277): OC\\Files\\View->getCacheEntry(Object(OCA\\Files_Trashbin\\Storage), '2012-09-25 Fehl...', '_dokumente\/2012...')\n#15 \/var\/www\/owncloud.dev\/apps\/dav\/lib\/connector\/sabre\/objecttree.php(155): OC\\Files\\View->getFileInfo('_dokumente\/2012...')\n#16 \/var\/www\/owncloud.dev\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(79): OCA\\DAV\\Connector\\Sabre\\ObjectTree->getNodeForPath('_dokumente\/2012...', 0)\n#17 [internal function]: Sabre\\DAV\\CorePlugin->httpGet(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#18 \/var\/www\/owncloud.dev\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#19 \/var\/www\/owncloud.dev\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\\Event\\EventEmitter->emit('method:GET', Array)\n#20 \/var\/www\/owncloud.dev\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#21 \/var\/www\/owncloud.dev\/apps\/dav\/appinfo\/v1\/webdav.php(54): Sabre\\DAV\\Server->exec()\n#22 \/var\/www\/owncloud.dev\/remote.php(137): require_once('\/var\/www\/ownclo...')\n#23 {main}", "File":"\/var\/www\/owncloud.dev\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/NativeState.php", "Line":42 }

And the remarkable thing is that the CIFS user has the access rights for this file.

I tested with commit edbe5d7

Any idea what's going on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment