Server: how to set min protocol smbv2 (in relation to wannacrypt)?

Created on 14 May 2017  路  6Comments  路  Source: nextcloud/server

Steps to reproduce

  1. attach windows share to nextcloud
  2. disable smbv1 support on windows
  3. share in nextcloud fails to mount

Expected behaviour

Share is mounted

Actual behaviour

Share is not mounted

Server configuration

Operating system: Fedora 25

Web server: nginx 1.13.0 + php-fpm

Database: MariaDB 10.1

PHP version: 7.0.18

Nextcloud version: 11.0.2

Updated from an older Nextcloud/ownCloud or fresh install: updated from 10 version

Where did you install Nextcloud from: official tar.gz

Signing status:


Signing status

Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

List of activated apps:


App list

If you have access to your command line run e.g.:
Enabled:
  - calendar: 1.5.1
  - contacts: 1.5.3
  - dav: 1.1.1
  - federatedfilesharing: 1.1.1
  - files: 1.6.1
  - files_external: 1.1.2
  - files_pdfviewer: 1.0.1
  - files_sharing: 1.1.1
  - files_videoplayer: 1.0.0
  - gallery: 16.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.0.0
  - nextcloud_announcements: 1.0
  - notifications: 1.0.1
  - password_policy: 1.1.0
  - provisioning_api: 1.1.0
  - serverinfo: 1.1.1
  - sharebymail: 1.0.1
  - survey_client: 0.1.5
  - templateeditor: 0.2
  - theming: 1.1.1
  - twofactor_backupcodes: 1.0.0
  - user_ldap: 1.1.2
  - workflowengine: 1.1.1
Disabled:
  - activity
  - admin_audit
  - comments
  - encryption
  - external
  - federation
  - files_accesscontrol
  - files_automatedtagging
  - files_retention
  - files_texteditor
  - files_trashbin
  - files_versions
  - firstrunwizard
  - systemtags
  - twofactor_totp
  - updatenotification
  - user_external
  - user_saml

Nextcloud configuration:


Config report

{
    "system": {
        "instanceid": "oc6z39vud6vh",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nextcloud-new.miacrh.ru",
            "192.168.7.35",
            "oblako.miacrh.ru"
        ],
        "datadirectory": "\/var\/www\/nextcloud\/data",
        "overwrite.cli.url": "",
        "dbtype": "mysql",
        "version": "11.0.2.7",
        "dbname": "nextcloud",
        "dbhost": "192.168.7.X",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "Asia\/Krasnoyarsk",
        "installed": true,
        "loglevel": 3,
        "ldapIgnoreNamingRules": false,
        "mail_smtpmode": "smtp",
        "mail_from_address": "owncloud",
        "mail_domain": "xxx.ru",
        "mail_smtphost": "mail.xxx.ru",
        "mail_smtpport": "465",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "enable_previews": false,
        "maintenance": false,
        "auth.bruteforce.protection.enabled": false,
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "filelocking.enabled": "true",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "localhost",
            "port": 6379,
            "timeout": 0,
            "dbindex": 0
        },
        "appstore.experimental.enabled": true
    }
}

Are you using external storage, if yes which one: smb

Are you using encryption: no

Are you using an external user-backend, if yes which one: ActiveDirectory

Client configuration

Browser: Chrome 58, Firefox 53

Operating system:

Logs

Web server error log


Web server error log

/var/log/php-fpm/error.log is empty

Nextcloud log (data/nextcloud.log)


Nextcloud log

{"reqId":"ztA6C+nDZkkVw7kYPsks","remoteAddr":"192.168.7.36","app":"files_external","message":"Exception: {\"Exception\":\"OCP\\\\Files\\\\StorageNotAvailableException\",\"Message\":\"smb:\\\/\\\/hserver3\\\/\\u0430\\u043d\\u043a\\u0435\\u0442\\u044b_\\u043c\\u043e\\\/\",\"Code\":110,\"Trace\":\"#0 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/files_external\\\/lib\\\/Lib\\\/Storage\\\/SMB.php(171): OCA\\\\Files_External\\\\Lib\\\\Storage\\\\SMB->getFileInfo('\\\/')\\n#1 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Common.php(439): OCA\\\\Files_External\\\\Lib\\\\Storage\\\\SMB->stat('')\\n#2 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/files_external\\\/lib\\\/Lib\\\/Storage\\\/SMB.php(438): OC\\\\Files\\\\Storage\\\\Common->test()\\n#3 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/files_external\\\/lib\\\/config.php(233): OCA\\\\Files_External\\\\Lib\\\\Storage\\\\SMB->test(false, true)\\n#4 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/files_external\\\/lib\\\/Controller\\\/StoragesController.php(255): OC_Mount_Config::getBackendStatus('\\\\\\\\OCA\\\\\\\\Files_Exte...', Array, false, true)\\n#5 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/files_external\\\/lib\\\/Controller\\\/GlobalStoragesController.php(179): OCA\\\\Files_External\\\\Controller\\\\StoragesController->updateStorageStatus(Object(OCA\\\\Files_External\\\\Lib\\\\StorageConfig), true)\\n#6 [internal function]: OCA\\\\Files_External\\\\Controller\\\\GlobalStoragesController->update(18, '\\\\xD0\\\\x90\\\\xD0\\\\xBD\\\\xD0\\\\xBA\\\\xD0\\\\xB5\\\\xD1\\\\x82\\\\xD1\\\\x8B \\\\xD0\\\\x9C...', 'smb', 'password::passw...', Array, Array, Array, Array, 100, true)\\n#7 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(160): call_user_func_array(Array, Array)\\n#8 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(90): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OCA\\\\Files_External\\\\Controller\\\\GlobalStoragesController), 'update')\\n#9 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/App.php(114): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OCA\\\\Files_External\\\\Controller\\\\GlobalStoragesController), 'update')\\n#10 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(47): OC\\\\AppFramework\\\\App::main('OCA\\\\\\\\Files_Exter...', 'update', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#11 [internal function]: OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n#12 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Route\\\/Router.php(299): call_user_func(Object(OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler), Array)\\n#13 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/base.php(1010): OC\\\\Route\\\\Router->match('\\\/apps\\\/files_ext...')\\n#14 \\\/var\\\/www\\\/nextcloud\\\/index.php(40): OC::handleRequest()\\n#15 {main}\",\"File\":\"\\\/var\\\/www\\\/nextcloud\\\/apps\\\/files_external\\\/lib\\\/Lib\\\/Storage\\\/SMB.php\",\"Line\":133}","level":3,"time":"2017-05-14T20:26:53+07:00","method":"PUT","url":"\/index.php\/apps\/files_external\/globalstorages\/18","user":"owncloud","version":"11.0.2.7"}

0. Needs triage external storage

Most helpful comment

add in global section smb.conf

client min protocol = SMB2
client max protocol = SMB3

resolves issue.

All 6 comments

cc @icewind1991

add in global section smb.conf

client min protocol = SMB2
client max protocol = SMB3

resolves issue.

Well I can confirm that changing the config file works.

Is it possible for Nextcloud to detect/try the correct protocol so we do not need to change the config file?

Still could not work on Windows in joined Domain. Do you guys only install the smbclient package in Nextcloud? Or along with php-smbclient module enabled?

I installed with php70u-pecl-smbclient and then it works for me with the above change to smb.conf

Can someone give me a hint how to get the php70u-pecl-smbclient running on archlinux?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rullzer picture rullzer  路  3Comments

arno01 picture arno01  路  3Comments

blackcrack picture blackcrack  路  3Comments

mama21mama picture mama21mama  路  3Comments

jancborchardt picture jancborchardt  路  3Comments