External Storage - Windows Share


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.


There were several issues solved with NC 10.0.1, can you upgrade and try again?

The error with the empty response, is that you Windows server how gives the empty response? Do they show you any errors in their logs?

Hi i’m also having this issue - a very complete description of my setup and problem can be found at: https://forums.freenas.org/index.php?threads/how-to-give-nextcloud-acces-to-my-share-v2.54905/

  • I’m using nextcloud 11.0.1 in a freebsd jail.
  • I’ve got nextcloud joined to active directory.
  • I’ve installed pecl-smbclient from ports.

Does anybody have an idea of why i might be getting this error? is there somewhere i can look to see more descriptive errors?

I gave up on the freebsd jail a tired building a ubuntu LTS 16.04 vm instead but I’m still getting the exact same issue as above:

i found these other posts with folks having similar issues:

and these related owncloud problems

https://central.owncloud.org/t/cant-connect-to-windows-share-smb3-empty-response-from-the-server/5941/2 - the just didn’t have libsmbclient installed - not my problem…

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…


i’ve got the green light finally but NC is barfing up errors when i try to access anything…

since last post I’ve done three things:

  1. modified smb.conf to : “client max protocol = SMB2” in the [global] section of /etc/samba/smb.conf
  2. i didn’t restart any services after I uninstalled libsmbclient-php - maybe the restart installed that and it was interfering?
  3. i installed the lan root certificate authority i created on freenas (after having scp’d it over) as per https://askubuntu.com/questions/645818/how-to-install-certificates-for-command-line :
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...')

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()

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:

  1. smb.conf mod did nothing - red herring
  2. libsmbclient-php - bingo - wrong library! - you need to use php-smbclient!
  3. 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…:



https://github.com/nextcloud/server/issues/3335 (see the bit about smb)


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…

… this may or may not be a general solution…


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:

min client protocol = SMB2
max client protokol = SMB3

Everything works fine now :slight_smile:


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?