I have just installed a basic installation on a vanilla Ubuntu server and in the most part it is running well. I have configured LDAP to a Windows Active Directory server and this is pulling information through correctly.
I am trying to add a Windows Share \servername\Company so that users who log in with their LDAP credentials can see the Shared Company data. I have added the folder as āSMB/CIFSā with the server name and folder set and also granted access to my test user account.
The folder appears when I log in with the test account but I am unable to expand it. I get the following error:
āThere was an error with message: Empty response from the server. Do you want to review mount point config in admin settings page?ā
I have tried all the authentication methods available in External Storage but none of them seem to work. Can anybody advise.
I also tried with ubuntuās libsmbclient-php package and then without it - it seemed to make no difference.
I installed ubuntuās cifs-utils package and verified that i was able to mount the share with command in the general form: mount -t cifs -o username=username,password=password //server-name/sharename /mountpoint: this worked FINE
i grabbed the few remaining things that werenāt installed but the other packages thought dependencies by apt-get install samba but it made no difference.
i found these other posts with folks having similar issues:
I should note that Iāve tried the all permutations of IP address, windows host-name, FQDN (as resolved by local dns only but it is a valid FQDN. What i want is to use the login credentials, save in session option but Iāve also tried the simple username a password option witch also doesnāt connectā¦
Go to /usr/share/ca-certificates/
Create a new folder, i.e. "sudo mkdir school"
Copy the .crt file into the school folder
Make sure the permissions are OK (755 for the folder, 644 for the file)
Run "sudo update-ca-certificates"
here are the errors that nextcloud is generating now:
Fatal webdav Sabre\DAV\Exception\ServiceUnavailable: HTTP/1.1 503 Storage is temporarily not available
/usr/share/nginx/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 939: OCA\DAV\Connector\Sabre\ObjectTree->getNodeForPath('someshare')
/usr/share/nginx/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 336: Sabre\DAV\Server->getPropertiesForPath('someshare', Array, 1)
[internal function] Sabre\DAV\CorePlugin->httpPropFind(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/usr/share/nginx/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
/usr/share/nginx/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method PROPFIND', Array)
/usr/share/nginx/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/usr/share/nginx/nextcloud/apps/dav/appinfo/v1/webdav.php - line 60: Sabre\DAV\Server->exec()
/usr/share/nginx/nextcloud/remote.php - line 165: require_once('/usr/share/ngin...')
{main}
and also:
Error files_external OCP\Files\StorageNotAvailableException: Unknown error (tree connect failed: NT_STATUS_ACCESS_DENIED)
/usr/share/nginx/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 171: OCA\Files_External\Lib\Storage\SMB->getFileInfo('/Visual Media')
/usr/share/nginx/nextcloud/lib/private/Files/Storage/Common.php - line 439: OCA\Files_External\Lib\Storage\SMB->stat('')
/usr/share/nginx/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 438: OC\Files\Storage\Common->test()
/usr/share/nginx/nextcloud/apps/files_external/lib/config.php - line 233: OCA\Files_External\Lib\Storage\SMB->test(false, false)
/usr/share/nginx/nextcloud/apps/files_external/lib/Controller/StoragesController.php - line 255: OC_Mount_Config getBackendStatus('\\OCA\\Files_Exte...', Array, false, false)
/usr/share/nginx/nextcloud/apps/files_external/lib/Controller/UserGlobalStoragesController.php - line 121: OCA\Files_External\Controller\StoragesController->updateStorageStatus(Object(OCA\Files_External\Lib\StorageConfig), false)
[internal function] OCA\Files_External\Controller\UserGlobalStoragesController->show(4, false)
/usr/share/nginx/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 160: call_user_func_array(Array, Array)
/usr/share/nginx/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 90: OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files_External\Controller\UserGlobalStoragesController), 'show')
/usr/share/nginx/nextcloud/lib/private/AppFramework/App.php - line 114: OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files_External\Controller\UserGlobalStoragesController), 'show')
/usr/share/nginx/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App main('OCA\\Files_Exter...', 'show', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
[internal function] OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
/usr/share/nginx/nextcloud/lib/private/Route/Router.php - line 299: call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
/usr/share/nginx/nextcloud/lib/base.php - line 1010: OC\Route\Router->match('/apps/files_ext...')
/usr/share/nginx/nextcloud/index.php - line 40: OC handleRequest()
{main}
Just to try to resolve what got me to āgreen light statusā iāll toggle those things i did and get back with resultsā¦
edit 1: changing or removing the sub-folder parameter doesnāt change the errorsā¦
confirmed! ubuntuās libsmbclient-php was the "red light culprit!
I just reran apt-get install libsmbclient-php rebooted (i probably could restarted nginx or php or something). and the red light came back again. removed it again and the green light is back.
to summarize:
smb.conf mod did nothing - red herring
libsmbclient-php - bingo - wrong library! - you need to use php-smbclient!
installing my root cert did nothing - i was wondering if it was a bad cert error or something but nah.
ok so the main interface is back and giving the error again:
storage is temporarily not available
googling this it seems that there may be a problem with the version of php-smbclient provided by ubuntu or php-config or the error lives in nexcloud orā¦:
Hi, so after alot of installing, uninstalling, general futzing i decided to actually try connecting with smbclient on the command line. It turns out that the strings that smbclient wants are different that what youād use to mount an smb share using the āmountā command. The biggest difference is that it wanted to use the old school nebios domain. I gave it that and everything worked. Then i tried it in nextcloud and ⦠bingo! so for me at least that was the solution.
⦠could be the funky open-source server stack iāve got going ⦠no windows servers just a bunch of unix machines pretending to be windowsā¦
I have the same configuration and Iām facing the same non-working behaviour. By configuring the external storage with the netbios domain name I was able to get a āgreen lightā. I can browse through the directories and see the files but: When I try to access a file, I canāt. The logfile shows:
Error PHP fread(): \Icewind\SMB\NativeStream::stream_read - read -8193 bytes more data than requested (-1 read, 8192 max) - excess data will be lost at /var/www/nextcloud/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#83
I hope that this issue could be solved soon since (from my personal view) this is one of the most important use cases.
after some more study it came up that the smbclient seems to handle the smb share NOT correctly if the windows server uses deduplication on the underlying storage. Referring to this article: Corrupt Files From an SMB External File Source
I changed the smb.conf in the following way:
[general]
min client protocol = SMB2
max client protokol = SMB3
Same problem on ArchLinux. Nextcloud 12.0.3, smbclient: 4.7.1. Try both: php-smbclient and php-smbclient-git. Smb server located on same Arch machine and has āclient min protocol = SMB2ā in config. Most important: no any logs (no warning, no errors, nothing) about establish smb connection in nextcloud.log (log level = 0 i.e. debug). Is anybody know how to trace nextcloud smb connection or run it manually and extract any information about problem?