CIFS/SMB external storage stopped working version 17.0.1

Hello,

I’m trying to configure the external shared folder in my nc with LDAP integration.

I’m using Debian 10, Nginx and PHP7.3-fpm following the c-rieger tutorial installation guide.

I can connect to my Synology shared folder but I can’t doing it using nextcloud.

Connecting from terminal everything works ok. Example:

root@cloud:~# smbclient //nascloud/pruebas -Usanclemente/administrador
Enter SANCLEMENTE\administrador’s password:
Try “help” to get a list of possible commands.
smb: > dir
. DA 0 Tue Nov 19 12:28:09 2019
… DA 0 Fri Nov 15 11:53:54 2019
probando DA 0 Tue Nov 19 12:28:09 2019

            8425250492 blocks of size 1024. 8368552484 blocks available

smb: > cd probando
smb: \probando> dir
. DA 0 Tue Nov 19 12:28:09 2019
… DA 0 Tue Nov 19 12:28:09 2019

            8425250492 blocks of size 1024. 8368552484 blocks available

smb: \probando> exit

I tried with SMB test (using php-smbclient) and I get this error:

Error while loading share content.

Icewind\SMB\Exception\ConnectionRefusedException:

  1. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php - line 62:Icewind\SMB\Exception\Exception::fromMap({ 1: "Icewin … "}, 111, null)
  2. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php - line 74:Icewind\SMB\Native\NativeState->handleError(null)
  3. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php - line 105:Icewind\SMB\Native\NativeState->testResult(false, “smb:///”)
  4. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php - line 92:Icewind\SMB\Native\NativeState->opendir(“smb:///”)
  5. /var/www/nextcloud/apps/smb_test/lib/Controller/SmbController.php - line 95:Icewind\SMB\Native\NativeShare->dir(null)
  6. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 170:OCA\SMBTest\Controller\SmbController->dir(null, null, null, null, Icewind\SMB\ … {}, null)
  7. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 99:OC\AppFramework\Http\Dispatcher->executeController(OCA\SMBTest\ … {}, “dir”)
  8. /var/www/nextcloud/lib/private/AppFramework/App.php - line 126:OC\AppFramework\Http\Dispatcher->dispatch(OCA\SMBTest\ … {}, “dir”)
  9. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:OC\AppFramework\App::main(“OCA\SMBTes … r”, “dir”, OC\AppFramew … {}, { _route: “smb_test.smb.dir”})
  10. OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: “smb_test.smb.dir”})
  11. /var/www/nextcloud/lib/private/Route/Router.php - line 297:call_user_func(OC\AppFramew … {}, { _route: “smb_test.smb.dir”})
  12. /var/www/nextcloud/lib/base.php - line 1000:OC\Route\Router->match("/apps/smb_test/dir")
  13. /var/www/nextcloud/index.php - line 42:OC::handleRequest()

If I try to create the external storage (joined to the domain) from NextCloud I get an error 422 in the Ajax request and there is no way of connecting.

I installed the server with different versions maybe 10 times almost with no success. Modifying samba versions protocol in /etc/samba/smb.conf the workgroup, etc… Connecting with and without domain, etc…etc…

Any idea, would be appreciated.

Thank you.

I’m using the last version 17.0.1.

Finally I have found a solution here: https://github.com/nextcloud/server/issues/17846

There is a problem in the file:

apps/files_external/lib/Lib/Backend/SMB.php

Line 56:

  (new DefinitionParameter('timeout', $l->t('Timeout')))
       ->setType(DefinitionParameter::VALUE_HIDDEN)                              

Should be:

 (new DefinitionParameter('timeout', $l->t('Timeout')))
   ->setType(DefinitionParameter::VALUE_HIDDEN)
   ->setFlag(DefinitionParameter::FLAG_OPTIONAL)

The external storage (connected to NetApp) started to work again after fixing the smb.conf to:

/etc/samba/smb.conf

client min protocol = NT1
client max protocol = NT1

1 Like

thank you, your solution helped me!

it fixed my issue ! thanks a lot