Server: External SMB/CIFS Broken on 17.0.1

Created on 7 Nov 2019  路  15Comments  路  Source: nextcloud/server

After upgrading to 17.0.1 Beta, I am no longer able to add External SMB/CIFS storage. Existing storage remains available to users.

Steps to reproduce

  1. Update to 17.0.1 Beta
  2. Add SMB/CIFS external storage

Expected behaviour

When correct information is added, a green check mark should appear to the left of the entry. The storage should be available via frontend.

Actual behaviour

Red exclamation mark appears and storage is not saved nor available.

Server configuration

Operating system:
Ubuntu 18.04 LTS

Web server:
Apache 2.4.29

Database:
MySQL 5.7

PHP version:
7.2.24

Nextcloud version: (see Nextcloud admin page)
17.0.1 Beta

Updated from an older Nextcloud/ownCloud or fresh install:
Updated from 17

I have reverted back to 17 from a snapshot.

0. Needs triage bug needs info

Most helpful comment

https://github.com/nextcloud/server/blob/88b6dc5eaf28b1bfe72a62773e8a9ce339979ea3/apps/files_external/lib/Lib/Backend/SMB.php#L56-L57

Does it work again if you change the above code to?

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

Edit: Fixed the wrong comma.

All 15 comments

Something in the logs?

Unfortunately, no and I did enable debugging. I also removed php-smbclient but no change.

I am also getting this error in 17.0.1 Beta

The network call to save the external storage returns a 422 with the response of
{"message":"Unsatisfied backend parameters"}

Request was

{
    "mountPoint": "FolderInNC",
    "backend": "smb",
    "authMechanism": "password::password",
    "backendOptions": {
        "host": "192.168.0.25",
        "share": "ShareName",
        "root": "FolderInShare",
        "domain": "",
        "show_hidden": false,
        "timeout": "",
        "user": "user",
        "password": "password"
    },
    "testOnly": true,
    "mountOptions": {
        "encrypt": true,
        "previews": true,
        "enable_sharing": false,
        "filesystem_check_changes": 1,
        "encoding_compatibility": false,
        "readonly": false
    }
}

https://github.com/nextcloud/server/blob/88b6dc5eaf28b1bfe72a62773e8a9ce339979ea3/apps/files_external/lib/Lib/Backend/SMB.php#L56-L57

Does it work again if you change the above code to?

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

Edit: Fixed the wrong comma.

@kesselb There is a slight typo in what you provided with the comma position but I can confirm that it resolved the issue to use the following;

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

Had the same issue (17.0.1 RC) and can confirm, that changing the code as suggested (with the correct comma position as noted by rawrspace) fixed it. Can change/add SMB shares again.

Same issue happening with 16.0.6, patch solves it.

Anyone pushing a PR to get this fix into the codebase?

I can confirm that this solution does work and the issue is still present in 17.01 stable.

Only saw the backport to stable17, but patch is needed also for 16 at least, isn鈥檛 it?

We are having this issue after upgrading to version 17.0.1. The external storage that was present on version 16 works but we can't create new ones

Please keep this pinned until 17.0.2 and 16.0.7 are released.

Same here:
"We are having this issue after upgrading to version 17.0.1. The external storage that was present on version 16 works but we can't create new ones"

Patch also fixed my NC 16.0.6 install.
I was able to add a new SMB share, but the SMB Tester still didn't work though.

Same here @kesselb - I was able to add external CIFS storages in 16.06. Without this update, 16.06 SMB external storages is broken.

Is there something similar in your SMB Tester @tavinus ? (P.S. Where is the SMB Tester?)

Was this page helpful?
0 / 5 - 0 ratings