External_storage:notify not working

Nextcloud-Server: Ubuntu 18.04
PHP 7.3
Windows-Fileserver: Windows Server 2012

When trying to enable external storage notify using sudo -u www-data occ files_external:notify 1 we get the error “Notify is not supported with the used smb version”.
We have php-smbclient, php-libsmbclient and smbclient binary installed.

In the smb.conf file we added client min protocol = SMB2and client max protocol = SMB3with no success.
After disabling php-smbclient so it uses the smbclient binary, none of the external storages work, with the error message “NT_STATUS_OBJECT_NAME_INVALID”.

Using smbclient, we can connect to the fileserver in the ubuntu console, but using “allinfo /” command returns the same error “NT_STATUS_OBJECT_NAME_INVALID”.

Is there any way to either:

  1. Get external_storage:notify to work with the php-smbclient OR
  2. Get the smbclient binary to work

Error when using smbclient binary:
[webdav] Fatal: Icewind\SMB\Exception\Exception: Unknown error
(NT_STATUS_OBJECT_NAME_INVALID) for / at <>

0. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php line 35
    Icewind\SMB\Exception\Exception::unknown("/", "NT_STATUS_OBJECT_NAME_INVALID")
 1. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Parser.php line 89
    Icewind\SMB\Exception\Exception::fromMap({NT_STATUS_LOGON ... "}, "NT_STATUS_OBJECT_NAME_INVALID", "/")
 2. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php line 433
    Icewind\SMB\Wrapped\Parser->checkForError(["NT_STATUS_OBJE ... "], "/")
 3. /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Share.php line 183
    Icewind\SMB\Wrapped\Share->parseOutput(["NT_STATUS_OBJE ... "], "/")
 4. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php line 178
    Icewind\SMB\Wrapped\Share->stat("/")
 5. /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php line 526
    OCA\Files_External\Lib\Storage\SMB->getFileInfo("/")
 6. /var/www/nextcloud/lib/private/Files/Storage/Common.php line 112
    OCA\Files_External\Lib\Storage\SMB->filetype("*** sensitive parameter replaced ***")
 7. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 112
    OC\Files\Storage\Common->is_dir("*** sensitive parameter replaced ***")
 8. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php line 112
    OC\Files\Storage\Wrapper\Wrapper->is_dir("*** sensitive parameter replaced ***")
 9. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php line 128
    OC\Files\Storage\Wrapper\Wrapper->is_dir("*** sensitive parameter replaced ***")
10. /var/www/nextcloud/lib/private/Files/Cache/Watcher.php line 103
    OC\Files\Storage\Wrapper\Availability->is_dir("*** sensitive parameter replaced ***")
11. /var/www/nextcloud/lib/private/Files/View.php line 1342
    OC\Files\Cache\Watcher->update("*** sensitive parameters replaced ***")
12. /var/www/nextcloud/lib/private/Files/View.php line 1382
    OC\Files\View->getCacheEntry(OC\Files\Storage ... l}, "*** sensitive parameter replaced ***", "//**")
13. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php line 223
    OC\Files\View->getFileInfo("/**/files/**")
14. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 76
    OCA\DAV\Connector\Sabre\Directory->getChild("**")
15. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 71
    Sabre\DAV\Tree->getNodeForPath("files/**/**")
16. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 71
    Sabre\DAV\Tree->getNodeForPath("files/richardbu ... B")
17. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 71
    Sabre\DAV\Tree->getNodeForPath("files/richardbu ... l")
18. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 967
    Sabre\DAV\Tree->getNodeForPath("files/richardbu ... s")
19. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1666
    Sabre\DAV\Server->getPropertiesIteratorForPath("files/richardbu ... s", ["{DAV:}getetag"], 0)
20. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 355
    Sabre\DAV\Server->generateMultiStatus(Generator {}, false)
21. <<closure>>
    Sabre\DAV\CorePlugin->httpPropFind(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
22. /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    undefinedundefinedcall_user_func_array([Sabre\DAV\CorePlugin {},"httpPropFind"], [Sabre\HTTP\Requ ... }])
23. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    Sabre\Event\EventEmitter->emit("method:PROPFIND", [Sabre\HTTP\Requ ... }])
24. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
25. /var/www/nextcloud/apps/dav/lib/Server.php line 317
    Sabre\DAV\Server->exec()
26. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
27. /var/www/nextcloud/remote.php line 163
    undefinedundefinedrequire_once("/var/www/nextcl ... p")

Error when using smbclient binary in console, issuing allinfo / command:
“Server doesn’t support UNIX CIFS calls.”

had to update ubuntu to 19.10 to install smbclient 4.10.7 which worked.

Hi Dominik,

I have the same problem.
I used Nextcloud VM with nextcloud 19 and Ubuntu 18.04.
It’s easy or risky to upgrade Ubuntu to 19.04 or 19.10 ?

Thx

I had a similar problem. Here is how I solved it:

Environment:

Nextcloud 18.
External folders stored in a WServer 2008 R2
smbclient --version → Version 4.7.6-Ubuntu

Problem:
Upgraded WServer 2008 R2 to WServer 2016.
External storage in nextcloud stopped working.
Could access the shared folders via $ smbclient
Upgrading from version 18 to 19 did not work.
After doing a fresh install (version 19) , I could access to some external folders only. Some folders remained inaccessible via Nextcloud.
Same error messages described in the first post

Solution:
Install php-smbclient

It seems Nextcloud 18 can work without php-smbclient with older WServer versions.

It took me a while to figure it out. Hope that helps.