SMB external storage broken after update Ubuntu 16.04 -> 18.04

After upgrading my webserver from Ubuntu 16.04 to 18.04 I’m facing the following issue:

My external SMB storages are not working anymore.

Please find the assiociated log below

[no app in context] Error: Icewind\SMB\Exception\ForbiddenException: Invalid request for /MARCOM (ForbiddenException) at <<closure>>

 0. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php line 62
    Icewind\SMB\Exception\Exception::fromMap({1: "Icewind\\SM ... "}, 1, "/MARCOM")
 1. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php line 74
    Icewind\SMB\Native\NativeState->handleError("/MARCOM")
 2. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php line 184
    Icewind\SMB\Native\NativeState->testResult("*** sensitive parameter replaced ***", "smb://192.168.2 ... M")
 3. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php line 133
    Icewind\SMB\Native\NativeState->stat("smb://192.168.2 ... M")
 4. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php line 112
    Icewind\SMB\Native\NativeShare->getStat("/MARCOM")
 5. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php line 179
    Icewind\SMB\Native\NativeShare->stat("/MARCOM")
 6. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php line 297
    OCA\Files_External\Lib\Storage\SMB->getFileInfo("/MARCOM")
 7. /var/www/nextcloud/lib/private/Files/Storage/Common.php line 456
    OCA\Files_External\Lib\Storage\SMB->stat("")
 8. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php line 613
    OC\Files\Storage\Common->test()
 9. /var/www/nextcloud/apps/files_external/lib/config.php line 276
    OCA\Files_External\Lib\Storage\SMB->test("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
10. /var/www/nextcloud/apps/files_external/lib/Controller/StoragesController.php line 257
    OC_Mount_Config::getBackendStatus("*** sensitive parameters replaced ***")
11. /var/www/nextcloud/apps/files_external/lib/Controller/StoragesController.php line 306
    OCA\Files_External\Controller\StoragesController->updateStorageStatus("*** sensitive parameters replaced ***")
12. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\Files_External\Controller\StoragesController->show(4, "*** sensitive parameter replaced ***")
13. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Files_Extern ... {}, "show")
14. /var/www/nextcloud/lib/private/AppFramework/App.php line 125
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Files_Extern ... {}, "show")
15. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\\Files_Exte ... r", "show", OC\AppFramework\ ... {}, {id: "4",_route: ... "})
16. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({id: "4",_route: ... "})
17. /var/www/nextcloud/lib/private/Route/Router.php line 299
    call_user_func(OC\AppFramework\ ... {}, {id: "4",_route: ... "})
18. /var/www/nextcloud/lib/base.php line 1008
    OC\Route\Router->match("/apps/files_external/globalstorages/4")
19. /var/www/nextcloud/index.php line 38
    OC::handleRequest()

GET /apps/files_external/globalstorages/4?testOnly=true
from 192.168.217.55 by vaneenw at 2020-07-23T11:41:13+00:00

my config.php:

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "cloud.avr.be",
            "192.168.218.100"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/cloud.avr.be",
        "overwritehost": "cloud.avr.be",
        "overwriteprotocol": "https",
        "dbtype": "mysql",
        "version": "18.0.2.2",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "mail_smtpmode": "smtp",
        "log_rotate_size": "10485760",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": true,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "dbindex": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "htaccess.RewriteBase": "\/",
        "loglevel": 2,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "PLAIN",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "default_language": "nl",
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "theme": "",
        "skeletondirectory": "\/var\/ncdata\/skeleton",
        "updater.release.channel": "stable",
        "ldapUserCleanupInterval": 51,
        "mail_sendmailmode": "smtp",
        "has_rebuilt_cache": true,
        "app_install_overwrite": [
            "keeweb"
        ],
        "onlyoffice": {
            "jwt_header": "tS90eWtY8uZ4wPnR8YZ4"
        }
    },

My server configuration:

  • OS: Ubuntu 18.04.
  • PHP 7.2 (smbclient module is enabled)
  • Apache 2.4

How could I solve this problem?

kr
Wouter

Ok problem is solved.
It turned out I had to fill in my domain in the external storage page.
Previously I left it blank and it worked fine.

Did you allow the upgrade to update the smb.conf file in 18.04? I noticed recently when I updated to 20.04 that it wanted to overwrite my conf file with an updated default conf, loosing my config. It may have replaced your old smb.conf with a default file that has example data in it. I would make sure you check your backups of your conf file or just configure the smb.conf file again with your external SMB storage paths.

/etc/samba/smb.conf

I just checked my /etc/samba/smb.conf and I found it was not the default one (normally I don’t overwrite config files while upgrading, but I could not remember it this time).

Also, I thought samba is for creating network shares, whilst smbclient/CIFS is for connecting to (existing) network shares?

Anyway, in my smb.conf file I did found the name of my workgroup/domain, the same I did enter in my Nextcloud external storage configuration (see my previous post)