server icon indicating copy to clipboard operation
server copied to clipboard

Can't upload .pdf or .docx on 12.0.3 version to a smb external storage

Open linuxkafe opened this issue 9 years ago • 10 comments

Hi, we’re getting some issues on uploading .pdf or .docx to a cifs external storage that’s being used as a group area. The following show the error that we get, I’ve tried to disable the plugins that we’re using, but the error persists: 322e34739e421eb6fd24c5d67ea582aba1beea36

The problem don’t occur on personal areas, and renaming the file doesn’t work to upload to the group area / external drive area.

It’s a external storage configured in administration without encryption. I do use an external authentication backend, in this case ldap.

I can upload other files, but the problem seems to bee related to the file content and not about his name, or extension.

I’ve replaced the smb backend (directory apps/files_external/3rdparty/icewind/smb ) from 12.0.2 version and that solved the problem.

linuxkafe avatar Oct 24 '17 08:10 linuxkafe

Thanks for your report. Unfortunately the image is unreadable. When opening an issue, please make use of the template and provide the info that is requested.

blizzz avatar Oct 24 '17 10:10 blizzz

Thanks for the reply. I've updated the image now.

linuxkafe avatar Oct 24 '17 11:10 linuxkafe

@nickvergessen activity issue in the exception, but i doubt it is responsible for aborting write. Or is it?

blizzz avatar Oct 24 '17 11:10 blizzz

I also doubt, but I think that I didn't try to disable that plugin when I was having the issue.

linuxkafe avatar Oct 24 '17 11:10 linuxkafe

Whats the actual name of the user? When you look into the nextcloud.log file directly, it should show that.

nickvergessen avatar Oct 24 '17 13:10 nickvergessen

Closing because we are missing information here. Once we have them we can reopen this issue.

MorrisJobke avatar Dec 18 '17 21:12 MorrisJobke

Still getting the same behaviour in 12.0.4 and now in 12.0.5 After smb backend from version 11 substitution the problem disappears

Getting the following in logs:

{"reqId":"3S7H3Rfm3Flkmqiu98jz","level":3,"time":"2018-01-25T11:25:21+00:00","remoteAddr":"193.137.54.7","user":"241409","app":"remote","method":"PUT","url":"/remote.php/webdav/Groups/ASU/Meltdown_Spectre/PsExec.exe","message":"Exception: {"Exception":"Error","Message":"Class '\\Icewind\\SMB\\Exception\\InvalidArgumentException' not found","Code":0,"Trace":"#0 \/ocdata\/html\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/NativeState.php(49): Icewind\\SMB\\Exception\\Exception::fromMap(Array, 22, NULL)\n#1 \/ocdata\/html\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/NativeState.php(61): Icewind\\SMB\\NativeState->handleError(NULL)\n#2 \/ocdata\/html\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/NativeState.php(231): Icewind\\SMB\\NativeState->testResult(false, Resource id #14)\n#3 \/ocdata\/html\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/NativeWriteStream.php(65): Icewind\\SMB\\NativeState->write(Resource id #14, 'MZ\\x90\\x00\\x03\\x00\\x00\\x00\\x04\\x00\\x00\\x00\\xFF\\xFF\\x00...')\n#4 \/ocdata\/html\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/NativeWriteStream.php(83): Icewind\\SMB\\NativeWriteStream->flushWrite()\n#5 [internal function]: Icewind\\SMB\\NativeWriteStream->stream_close()\n#6 \/ocdata\/html\/apps\/files_external\/3rdparty\/icewind\/streams\/src\/Wrapper.php(124): fclose(Resource id #18)\n#7 \/ocdata\/html\/apps\/files_external\/3rdparty\/icewind\/streams\/src\/CallbackWrapper.php(107): Icewind\\Streams\\Wrapper->stream_close()\n#8 [internal function]: Icewind\\Streams\\CallbackWrapper->stream_close()\n#9 \/ocdata\/html\/apps\/dav\/lib\/Connector\/Sabre\/File.php(135): fclose(Resource id #21)\n#10 \/ocdata\/html\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php(151): OCA\\DAV\\Connector\\Sabre\\File->put(Resource id #12)\n#11 \/ocdata\/html\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(1096): OCA\\DAV\\Connector\\Sabre\\Directory->createFile('PsExec.exe', Resource id #12)\n#12 \/ocdata\/html\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(525): Sabre\\DAV\\Server->createFile('Groups\/ASU\/Melt...', Resource id #12, NULL)\n#13 [internal function]: Sabre\\DAV\\CorePlugin->httpPut(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#14 \/ocdata\/html\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#15 \/ocdata\/html\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(479): Sabre\\Event\\EventEmitter->emit('method:PUT', Array)\n#16 \/ocdata\/html\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#17 \/ocdata\/html\/apps\/dav\/appinfo\/v1\/webdav.php(76): Sabre\\DAV\\Server->exec()\n#18 \/ocdata\/html\/remote.php(162): require_once('\/ocdata\/html\/ap...')\n#19 {main}","File":"\/ocdata\/html\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/Exception\/Exception.php","Line":30}","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36","version":"12.0.5.3"}

linuxkafe avatar Jan 25 '18 12:01 linuxkafe

@MorrisJobke We have the same issue.

reopen this issue. If you need more info, we can provide it.

ynott avatar Mar 07 '18 06:03 ynott

@upmferraz that's a different error and seems to be related to a third party lib we use. Anyway, please open a new bug report on that repo. fyi @icewind1991

blizzz avatar Mar 07 '18 09:03 blizzz

ref. https://github.com/icewind1991/SMB/issues/63

ynott avatar Mar 09 '18 03:03 ynott