SMB External Storage mounting issue

system information

  • if you have systeminfo app installed you will find the required data on https://{your nextcloud}/settings/admin/serverinfo
  • collect anonymized system report using https://{your nextcloud}/settings/admin/support
Nextcloud version 27
Operating system and version : Linux 5.19.0-46-generic x86_64
Apache or nginx version : xampp 8.2.4.0
PHP version (eg, 8.1): 8.2.4
Database : sqlite

|Is this the first time you’ve seen this error?|no|

The issue i am facing:

Hi, i am dealing with this problem for over 1 year.
I have Windows Server domain, on this server are many network SMB shares. Everything is working fine, Windows users and Linux users can mount these shares without any problems. Some of the shares are located at server’s C:\ drive and some on other HDD’s. In Nextcloud when i want to mount share stored on C:\ drive (in Windows server), it works fine, share is properly mounted. When i want to mount share stored on other drives, it does not work. When i am mounting shares just in Ubuntu with mount command, it works fine, only in Nextcloud it is not working. I tried everything, different versions of PHP, Nextcloud, SMB and samba, CIFS etc. Now i am running Nextcloud on Ubuntu Desktop (my personal laptop) only for testing purpouses, but i tried to run on Debian, Ubuntu server, Cent, Mint, everything on real machine and in virtualization, nothing worked. I am reposting this issue after one year, because i had no idea how to solve it. I am connecting with CORRECT username, password, domain, ip address etc. Working shares have the same privilegies as not working shares, The problem is not in Windows.

  • The output of my Nextcloud log in Admin > Logging:
Icewind\SMB\Exception\Exception: Unknown error (NT_STATUS_OBJECT_NAME_INVALID) for /

    /opt/lampp/htdocs/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php - line 49:

    Icewind\SMB\Exception\Exception::unknown("/", "NT_STATUS_OBJECT_NAME_INVALID")

    /opt/lampp/htdocs/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Parser.php - line 92:

    Icewind\SMB\Exception\Exception::fromMap([ "Icewind\\ ... "], "NT_STATUS_OBJECT_NAME_INVALID", "/")

    /opt/lampp/htdocs/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php - line 479:

    Icewind\SMB\Wrapped\Parser->checkForError([ "NT_STATUS ... "], "/")

    /opt/lampp/htdocs/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php - line 215:

    Icewind\SMB\Wrapped\Share->parseOutput([ "NT_STATUS ... "], "/")

    /opt/lampp/htdocs/apps/files_external/lib/Lib/Storage/SMB.php - line 191:

    Icewind\SMB\Wrapped\Share->stat("/")

    /opt/lampp/htdocs/apps/files_external/lib/Lib/Storage/SMB.php - line 352:

    OCA\Files_External\Lib\Storage\SMB->getFileInfo("/")

    /opt/lampp/htdocs/lib/private/Files/Storage/Common.php - line 465:

    OCA\Files_External\Lib\Storage\SMB->stat("")

    /opt/lampp/htdocs/apps/files_external/lib/Lib/Storage/SMB.php - line 733:

    OC\Files\Storage\Common->test()

    /opt/lampp/htdocs/apps/files_external/lib/MountConfig.php - line 131:

    OCA\Files_External\Lib\Storage\SMB->test("*** sensiti ... *", "*** sensiti ... *")

    /opt/lampp/htdocs/apps/files_external/lib/Controller/StoragesController.php - line 287:

    OCA\Files_External\MountConfig::getBackendStatus("*** sensiti ... *")

    /opt/lampp/htdocs/apps/files_external/lib/Controller/GlobalStoragesController.php - line 201:

    OCA\Files_External\Controller\StoragesController->updateStorageStatus("*** sensiti ... *")

    /opt/lampp/htdocs/lib/private/AppFramework/Http/Dispatcher.php - line 230:

    OCA\Files_External\Controller\GlobalStoragesController->update("*** sensiti ... *")

    /opt/lampp/htdocs/lib/private/AppFramework/Http/Dispatcher.php - line 137:

    OC\AppFramework\Http\Dispatcher->executeController([ "OCA\\File ... "], "update")

    /opt/lampp/htdocs/lib/private/AppFramework/App.php - line 183:

    OC\AppFramework\Http\Dispatcher->dispatch([ "OCA\\File ... "], "update")

    /opt/lampp/htdocs/lib/private/Route/Router.php - line 315:

    OC\AppFramework\App::main("OCA\\Files_ ... r", "update", [ "OC\\AppFr ... "], [ "1","files ... "])

    /opt/lampp/htdocs/lib/base.php - line 1064:

    OC\Route\Router->match("/apps/files ... 1")

    /opt/lampp/htdocs/index.php - line 36:

    OC::handleRequest()
  • The output of my config.php file in /path/to/nextcloud**:
Server configuration detail

Operating system: Linux 5.19.0-46-generic #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 21 15:35:31 UTC 2 x86_64

Webserver: Apache/2.4.56 (Unix) OpenSSL/1.1.1t PHP/8.2.4 mod_perl/2.0.12 Perl/v5.34.1 (apache2handler)

Database: sqlite3 3.38.5

PHP version: 8.2.4

Modules loaded: Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dba, dom, hash, fileinfo, filter, ftp, gd, gettext, json, iconv, SPL, intl, session, ldap, mbstring, standard, mysqlnd, exif, mysqli, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, Phar, posix, random, Reflection, imap, shmop, SimpleXML, soap, sockets, sysvsem, sysvshm, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, apache2handler

Nextcloud version: 27.0.0 - 27.0.0.8

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

<details><summary>Signing status</summary>

[]
</details>

<details><summary>List of activated apps</summary>

Enabled:
 - activity: 2.19.0
 - calendar: 4.4.3
 - circles: 27.0.0
 - cloud_federation_api: 1.10.0
 - comments: 1.17.0
 - contacts: 5.3.2
 - contactsinteraction: 1.8.0
 - dashboard: 7.7.0
 - dav: 1.27.0
 - federatedfilesharing: 1.17.0
 - federation: 1.17.0
 - files: 1.22.0
 - files_external: 1.19.0
 - files_pdfviewer: 2.8.0
 - files_rightclick: 1.6.0
 - files_sharing: 1.19.0
 - files_trashbin: 1.17.0
 - files_versions: 1.20.0
 - firstrunwizard: 2.16.0
 - logreader: 2.12.0
 - lookup_server_connector: 1.15.0
 - mail: 3.2.3
 - nextcloud_announcements: 1.16.0
 - notes: 4.8.0
 - notifications: 2.15.0
 - oauth2: 1.15.0
 - password_policy: 1.17.0
 - photos: 2.3.0
 - privacy: 1.11.0
 - provisioning_api: 1.17.0
 - recommendations: 1.6.0
 - related_resources: 1.2.0
 - richdocuments: 8.1.0
 - serverinfo: 1.17.0
 - settings: 1.9.0
 - sharebymail: 1.17.0
 - spreed: 17.0.1
 - support: 1.10.0
 - survey_client: 1.15.0
 - systemtags: 1.17.0
 - text: 3.8.0
 - theming: 2.2.0
 - twofactor_backupcodes: 1.16.0
 - updatenotification: 1.17.0
 - user_status: 1.7.0
 - viewer: 2.1.0
 - weather_status: 1.7.0
 - workflowengine: 2.9.0
Disabled:
 - admin_audit
 - bruteforcesettings
 - encryption
 - suspicious_login
 - twofactor_totp
 - user_ldap


</details>

<details><summary>Configuration (config/config.php)</summary>

{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "localhost"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "sqlite3",
    "version": "27.0.0.8",
    "overwrite.cli.url": "http:\/\/localhost",
    "installed": true
}

</details>

Cron Configuration: Array
(
[backgroundjobs_mode] => ajax
[lastcron] => 1688670702
)

External storages: yes

<details><summary>External storage configuration</summary>

+----------+-------------+----------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+---------+------------------+-------------------+-------+
| Mount ID | Mount Point | Storage  | Authentication Type   | Configuration                                                                                                                                                   | Options | Applicable Users | Applicable Groups | Type  |
+----------+-------------+----------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+---------+------------------+-------------------+-------+
| 1        | /SMB        | SMB/CIFS | Username and password | check_acl: false, domain: "", host: "propnet.ddns.net", password: "***", root: "", share: "webhosting", show_hidden: false, timeout: "", user: "***" |         | All              |                   | Admin |
+----------+-------------+----------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+---------+------------------+-------------------+-------+


</details>

Encryption: no

User-backends:

OC\User\Database

Talk configuration:

STUN servers

no custom server configured

TURN servers

no custom server configured

Signaling servers (mode: default):

no custom server configured

Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0