server icon indicating copy to clipboard operation
server copied to clipboard

External SMB/CIFS Broken on 17.0.1

Open cyberfarer opened this issue 7 years ago • 15 comments

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.

cyberfarer avatar Nov 07 '19 18:11 cyberfarer

Something in the logs?

kesselb avatar Nov 07 '19 18:11 kesselb

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

cyberfarer avatar Nov 07 '19 18:11 cyberfarer

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
    }
}

rawrspace avatar Nov 08 '19 05:11 rawrspace

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 avatar Nov 08 '19 07:11 kesselb

@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),

rawrspace avatar Nov 08 '19 13:11 rawrspace

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.

spiezmaestro avatar Nov 09 '19 10:11 spiezmaestro

Same issue happening with 16.0.6, patch solves it.

scanom avatar Nov 11 '19 16:11 scanom

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

e-alfred avatar Nov 11 '19 17:11 e-alfred

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

southeasterntech avatar Nov 12 '19 13:11 southeasterntech

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

scanom avatar Nov 13 '19 16:11 scanom

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

ikerib avatar Nov 19 '19 10:11 ikerib

Please keep this pinned until 17.0.2 and 16.0.7 are released.

kesselb avatar Nov 26 '19 15:11 kesselb

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"

florian-obradovic avatar Nov 29 '19 11:11 florian-obradovic

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.

tavinus avatar Dec 12 '19 19:12 tavinus

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

ShamimIslam avatar Dec 14 '19 07:12 ShamimIslam