owncloud / owncloud/core

SMB for Samba > 4.10.18 (possibly) not working

Open
#38,278 12 comments 0 reactions 1 assignee View on GitHub

@jvillafanez is already working on this.

Since Jan 11, 2021.

needs info Type:Bug
Dominant language
PHP
Stars
8.8k
Forks
2.1k
Avg merge
20h 7m
Merged PRs (30d)
41

Description

Steps to reproduce
  1. Uninstall smbclient installed from Ubuntu 20.04
  2. Compile a newer version > 4.10.18 (does not matter which one, valid up to last stable or samba-master)
  3. Check SMB links
Expected behaviour

Existing mounts should be green and new mounts be creatable

Actual behaviour

Existing mounts always red, new mounts can´t be created (red)

Following scenario and testing:
Post upgrading from U18.04 to 20.04, I saw that my SMB shares were no longer accessible. This is due to changes in Samba and an older fileserver. Looking for a solution, I tested following scenarious, where all versions need a samba compilation from source:

  1. Samba 4.10.18 (the last one before a bigger change, not patched) - works
  2. Samba 4.11.6 (the one installed from OS, patches applied) - does not work
  3. Samba 4.13.3 (the lastest stable version, patches applied) - does not work
  4. Samba Master (git clone, patches applied) - does not work

Note I regarding patching:
See a bug I filed and the patches provided at https://bugzilla.samba.org/show_bug.cgi?id=14607
For versions where I applied the patches, I can connect in all cases flawless with smbclient -L filer -U domain/user and run successfully the icewind php example.php test.

Note II regarding patching:
I can´t test if the Ubuntu provided smbclient version would work, because I do not have a "younger" SMB fileserver...

Note regarding pecl smbclient:
No differences in behaviour if installed or not!

Note regarding testing:
I cloned https://github.com/icewind1991/SMB and did a check if I can connect via php example.php. I was able to properly connect in ALL cases

Why not taking the "works" version 4.10.18
This ist the last version that allows NT1 compatibility. Newer fileservers do not longer support NT1 - means you are in a deadlock when having both. The patch (and later when included in stable) solves this problem, native SMB2 allowed!

Note regading the Samba versions of Ubuntu
The Ubuntu shipped version of smbclient (Samba) (Ubuntu updates very seldom...).
U18.04: 4.7.6 (2018.03)
U20.04: 4.11.6 (2020.01)
Latest Stable Samba: 4.13.3 (2020.12)
Last version before big change (4.10->4.11): 4.10.18 (2020.9)

My findings:
Because I can connect with smbclient and php example.php, the source issue must be in ownCloud. I stronly believe, that it is a minor thing - else the tests before would not work.

Server configuration

Operating system: Ubuntu 20.04

Web server: nginx

Database: mariadb

PHP version: 7.4

ownCloud version: 10.6

Updated from an older ownCloud or fresh install: updated

Where did you install ownCloud from: tar

Signing status (ownCloud 9.0 and above):

all ok

The content of config/config.php:

{
    "system": {
        "instanceid": "oct7bkicorxf",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "url"
        ],
        "datadirectory": "\/var\/www\/owncloud\/data",
        "overwrite.cli.url": "https:\/\/url",
        "htaccess.RewriteBase": "\/",
        "dbtype": "mysql",
        "version": "10.6.0.5",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "Europe\/Vienna",
        "installed": true,
        "filelocking.enabled": "true",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "\/var\/run\/redis\/redis-server.sock",
            "port": 0,
            "timeout": 0,
            "dbindex": 0
        },
        "filesystem_check_changes": 1,
        "loglevel": 2,
        "mail_smtpmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "tls",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "maintenance": false,
        "theme": "",
        "preview_max_scale_factor": 1,
        "excluded_directories": [
            ".snapshot",
            "~snapshot"
        ],
        "upgrade.automatic-app-update": true,
        "quota_include_external_storage": false,
        "singleuser": false,
        "apps_paths": [
            {
                "path": "\/var\/www\/owncloud\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/owncloud\/apps-external",
                "url": "\/apps-external",
                "writable": true
            }
        ],
        "show_server_hostname": false,
        "log_rotate_size": "20971520"
    }
}

List of activated apps:

Enabled:
  - activity: 2.6.0
  - audioplayer: 2.8.4
  - comments: 0.3.0
  - configreport: 0.2.0
  - dav: 0.6.0
  - federatedfilesharing: 0.5.0
  - federation: 0.1.0
  - files: 1.5.2
  - files_clipboard: 1.0.3
  - files_external: 0.7.1
  - files_external_dropbox: 1.2.0
  - files_external_ftp: 0.2.1
  - files_mediaviewer: 1.0.3
  - files_pdfviewer: 0.11.2
  - files_sharing: 0.14.0
  - files_texteditor: 2.3.0
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - firstrunwizard: 1.2.0
  - market: 0.6.0
  - notifications: 0.5.2
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - templateeditor: 0.4.0
  - updatenotification: 0.2.1
Disabled:
  - encryption
  - external
  - guests
  - user_external

Are you using external storage, if yes which one: local/smb/gd.

Are you using encryption: no

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

Logs
Web server error log
No errors
ownCloud log (data/owncloud.log)

I tried with loglevel=0, but there is no usable output ???

No relevant data

@pmaier1 @micbar

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.