nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.27k stars 3.96k forks source link

external_storage:notify not working #19429

Closed Jogoedota closed 1 year ago

Jogoedota commented 4 years ago

Steps to reproduce

  1. sudo -u www-data php occ files_external:notify 1

Expected behaviour

Nextcloud starts tracking the changes made in the remote repository

Actual behaviour

Tell us what happens instead Error: "Notify is not supported with the used smb version."

Server configuration

Operating system: Ubuntu 18.04 Web server: apache2 Database: mysql PHP version: 7.3 Nextcloud version: (see Nextcloud admin page) 17.0.3 Updated from an older Nextcloud/ownCloud or fresh install: Updated, first install was 14 Where did you install Nextcloud from: Archive file Signing status:

Signing status ``` No errors have been found. ```

List of activated apps:

App list ``` Enabled: - accessibility: 1.3.0 - activity: 2.10.1 - admin_audit: 1.7.0 - cloud_federation_api: 1.0.0 - dav: 1.13.0 - federatedfilesharing: 1.7.0 - files: 1.12.0 - files_external: 1.8.0 - files_pdfviewer: 1.6.0 - files_rightclick: 0.15.1 - files_versions: 1.10.0 - files_videoplayer: 1.6.0 - gallery: 18.4.0 - logreader: 2.2.0 - lookup_server_connector: 1.5.0 - notifications: 2.5.0 - oauth2: 1.5.0 - password_policy: 1.7.0 - privacy: 1.1.0 - provisioning_api: 1.7.0 - recommendations: 0.5.0 - serverinfo: 1.7.0 - smb_test: 0.2.4 - text: 1.1.1 - theming: 1.8.0 - twofactor_backupcodes: 1.6.0 - updatenotification: 1.7.0 - viewer: 1.2.0 - workflowengine: 1.7.0 Disabled: - comments - encryption - federation - files_sharing - files_trashbin - firstrunwizard - nextcloud_announcements - sharebymail - support - survey_client - systemtags - user_ldap ```

Nextcloud configuration:

Config report ``` { "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "172.17.0.20", "sasync.secarea.eu" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "tempdirectory": "\/var\/www\/nextcloud\/tmp", "dbtype": "mysql", "version": "17.0.3.1", "overwrite.cli.url": "http:\/\/172.17.0.20", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "updater.release.channel": "stable", "maintenance": false, "theme": "", "debug": false, "filelocking.enabled": true, "loglevel": 2, "memcache.local": "\\OC\\Memcache\\APCu", "memcache.distributed": "\\OC\\Memcache\\Redis", "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 6379, "dbindex": 0, "password": "***REMOVED SENSITIVE VALUE***", "timeout": 0 } } } ```

Are you using external storage, if yes which one: local/smb/sftp/... smb Are you using encryption: yes/no no Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... Webdav

Client configuration

Browser: Chrome Operating system: Windows

Logs

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` [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. <> 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") ```

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:

Get external_storage:notify to work with the php-smbclient OR 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 <>

  1. /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 ")
  2. /var/www/nextcloud/lib/private/Files/Cache/Watcher.php line 103 OC\Files\Storage\Wrapper\Availability->is_dir(" sensitive parameter replaced ")
  3. /var/www/nextcloud/lib/private/Files/View.php line 1342 OC\Files\Cache\Watcher->update(" sensitive parameters replaced ")
  4. /var/www/nextcloud/lib/private/Files/View.php line 1382 OC\Files\View->getCacheEntry(OC\Files\Storage ... l}, " sensitive parameter replaced ", "//**")
  5. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php line 223 OC\Files\View->getFileInfo("//files/")
  6. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 76 OCA\DAV\Connector\Sabre\Directory->getChild("**")
  7. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 71 Sabre\DAV\Tree->getNodeForPath("files//")
  8. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 71 Sabre\DAV\Tree->getNodeForPath("files/richardbu ... B")
  9. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 71 Sabre\DAV\Tree->getNodeForPath("files/richardbu ... l")
  10. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 967 Sabre\DAV\Tree->getNodeForPath("files/richardbu ... s")
  11. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1666 Sabre\DAV\Server->getPropertiesIteratorForPath("files/richardbu ... s", ["{DAV:}getetag"], 0)
  12. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 355 Sabre\DAV\Server->generateMultiStatus(Generator {}, false)
  13. <> Sabre\DAV\CorePlugin->httpPropFind(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  14. /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105 undefinedundefinedcall_user_func_array([Sabre\DAV\CorePlugin {},"httpPropFind"], [Sabre\HTTP\Requ ... }])
  15. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479 Sabre\Event\EventEmitter->emit("method:PROPFIND", [Sabre\HTTP\Requ ... }])
  16. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254 Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  17. /var/www/nextcloud/apps/dav/lib/Server.php line 317 Sabre\DAV\Server->exec()
  18. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35 OCA\DAV\Server->exec()
  19. /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.”
stefanoklett commented 4 years ago

there is really no way to run this? This is a real problem. There is any working version?

regards

Jogoedota commented 4 years ago

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

stefanoklett commented 4 years ago

really? This for the client side of SMB? Many thanks

Jogoedota commented 4 years ago

Yes, had to add client min protocol = SMB2 and client max protocol = SMB3 aswell to the smb.conf and reboot the server for it to work.

stefanoklett commented 4 years ago

Interesting, I did the upgrade, and now:

sudo -u www-data php occ files_external:notify -u stekhome/stefano -p 1

smbXcli_negprot_smb1_done: No compatible protocol selected by server. Protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE

In Exception.php line 17:

Unknown error (NT_STATUS_NOT_IMPLEMENTED) for Notify is not supported with the used smb version

of curse I set the client min/max protocol in smb.conf... regards

Jogoedota commented 4 years ago

Whats your SMB-Servers configuaration? Seems like it doesn't support SMB2/3

stefanoklett commented 4 years ago

The SMB Server is a Synology (last version). Of curse is configured with:

[global] min protocol = SMB2 max protocol = SMB3

I'm frustraded, no ideas.

Jogoedota commented 4 years ago

You configured the client to only use SMB2/3, but your Synology seems to not support it or is not enabled. You should be able to enable it in Control Panel->File Services

stefanoklett commented 4 years ago

It is exactly what I did, over the Control Panel. I just check on the smb.conf file. In any case, I can connect to the share thought nextcloud but I can't synchronize local changes

stefanoklett commented 4 years ago

To avoid the following messages I have to enabe SMB1(NT1) on the server: smbXcli_negprot_smb1_done: No compatible protocol selected by server. Protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE

Then site client:

[global]
min protocol = SMB2
max protocol = SMB3

But the error persist:

sudo -u www-data php occ files_external:notify -u stekhome/stefano -p mypassword 1

In Exception.php line 17:

Unknown error (NT_STATUS_NOT_IMPLEMENTED) for Notify is not supported with the used smb version

Any other ideas where to search?

stefanoklett commented 4 years ago

It seams that nobody is using Nextcloud with Synology. Will me nice to know where to search.

I can see on Synology that after I run the command: $ sudo -u www-data php /var/www/nextcloud/occ files_external:notify -u STEK.HOME/user -p password 1 The files will be download:

/home/.nc_test_folder/subfile.txt
/home/.nc_test_file.txt

But I still get the following error:

In Exception.php line 17:

  Unknown error (NT_STATUS_NOT_IMPLEMENTED) for Notify is not supported with the used smb version  

files_external:notify [-u|--user USER] [-p|--password PASSWORD] [--path PATH] [--output [OUTPUT]] [--] <mount_id>

Thanks for any help..

Jogoedota commented 4 years ago

You enabled SMB1 on the Synology but your smbclient wants to use SMB2/3, thats why its not working. You have to check if you can enable SMB2/3 on your Synology - if that doesn't work I guess you can't use notify.

stefanoklett commented 4 years ago

No, no. If I setup SMB2/3 on boths: smbXcli_negprot_smb1_done: No compatible protocol selected by server.

Protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE

In Exception.php line 17:

Unknown error (NT_STATUS_NOT_IMPLEMENTED) for Notify is not supported with the used smb version

When I setup NT1 to SM3 on Synology and SMB2/SMB3 on ubuntu client:

In Exception.php line 17:

  Unknown error (NT_STATUS_NOT_IMPLEMENTED) for Notify is not supported with the used smb version  
stefanoklett commented 4 years ago

To understand if is the Synology that answer with NT1, bot I think is not the case, because if I enable NT1 only (for test), I can't access the share from Win10 and Nextcloud/Ubuntu. The impression that the occ request from Nextcloud/Ubuntu is using the bad protocol. But the Nextcloud Share is accessible thought my Nextcloud portal. There is any other confing file where to search. I'm really frustrated with that, next steep is to use an other cloud system! I invested to much time on this.

stefanoklett commented 4 years ago

There is really no solution? Then Nextcloud is for me unusable.

Mpic commented 4 years ago

I have the exact same problem, also with Synology external storage. With smbclient default version on Ubuntu 18.04 (4.7.6 I think), I could access the SMB shares with NextCloud but not enable notify.

I updated smbclient to 4.10.15 through the samba ppa, now NextCloud cannot even access SMB shares (giving this error screen) and trying to enable notify gives the same error as @stefanoklett :

sudo -u www-data /var/www/html/occ files_external:notify 1
smbXcli_negprot_smb1_done: No compatible protocol selected by server.
Protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE

I even tried uninstalling php-smbclient to be sure NextCloud uses smbclient binary. By the way, accessing the shares directly with smbclient works, using either SMB2 or SMB3 :

smbclient //server/share -U user -m SMB2
smb: \> notify test_folder
0001 notification
...

I'm a bit clueless : some people reported that updating smbclient was enough to get notify working.

ghost commented 3 years ago

Same problem here with this scenario:

Samba is running with these 2 directives:

client min protocol = SMB2
client max protocol = SMB3

If I comment those two (Samba 4.11 does not need anymore to deprecate SMB1 explicitly as shown in https://wiki.samba.org/index.php/Samba_4.11_Features_added/changed#SMB1_is_disabled_by_default) the message:

smbXcli_negprot_smb1_done: No compatible protocol selected by server.
Protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE

is still there, and the occ command never ends.

The SMB shown during the occ command execution seems to be 3 though:

Captura de pantalla de 2020-10-21 19-22-56

Blobster21 commented 3 years ago

I have exactely the same issue using : Ubuntu 20.04.1 Nextcloud 19.0.4 External storage 1.10.0 Samba 4.11.6 running on both the local and the distant machine

[global] client max protocol = SMB3 client min protocol = SMB2

While the rest of the occ scan command performs normally for local files, the samba shares scan always end up with the following message:

Starting scan for user 1 out of 1 (user1) smbXcli_negprot_smb1_done: No compatible protocol selected by server. Protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE Both computers run the same min/max SMB3_11 protocol, to no available.

alexander7567 commented 3 years ago

Same issue for me as well :( Running Ubuntu 20.04 with Nextcloud 20.0.2. I also get the error when I try to run php cron.php

ghost commented 3 years ago

Same issue here.

Newest Nextcloud version by today. Ubuntu 20.04 Server Everything runs but accessing samba/cifs shares via the external storage provider on Nextcloud gives me this error: smbXcli_negprot_smb1_done: No compatible protocol selected by server. Protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE

mnestor commented 3 years ago

Ok I have this working after plenty of frustration.

Synology: 6.2.3-25426 Update 3 SMB Configured: Min SMB2, Max SMB3

Nextlcoud: 21.0.0 in Docker-Apache

I had to build a slight devision from the official image to add smbclient and assorted libs for it.

The key was to add the min/max to the smb.conf in the image. I did everything but add those to smb.conf and it forced me to set SMB1 as the min on my Synology. After adding the smb.conf I can scan without that blasted error anymore.

Here is the image I got this working with. Maybe it'll help someone else: https://hub.docker.com/r/mnestor/nextcloud-smb https://github.com/mnestor/nextcloud-smb

boredazfcuk commented 3 years ago

Cheers for this @mnestor

I just run into the same issue but think I have a little more info to add which may help track down this issue... I don't think this is down to SMB2, although setting the minimum protocol level will fix it. I didn't need to specify a maximum SMB version.

I have a \\Server1\TeamData\<CustomerName> shared folder that allows access for external customers who have Nextcloud accounts. They have an External Storage CIFS/SMB share configured with the Authentication method set to Username and Password. The credentials for a generic Windows AD account are placed in here. This allows our external customers to map drives using WebDAV.

However, I have also published \\Server1\TeamData as share for the Windows AD Domain Users group. This share is set to Log-in credentials, save in session and this did not work.

It seems that if credentials are manually set for the share, it will work, but if the credentials are taken from the login credentials for the session, the minimum required SMB version need to be set to SMB2_02 in the /etc/samba/smb.conf file.

szaimen commented 3 years ago

I suppose this is still valid in NC21.0.2?

ghost commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

mattico commented 2 years ago

Bump 🙄

szaimen commented 2 years ago

So I suppose it is still valid on NC21.0.3?

mattico commented 2 years ago

Sorry, yes. I am still experiencing this error on NC21.0.3.

markushub commented 2 years ago

Nextcloud 22.1.0 on Synology Nas DSM 7 (direct install no docker) and I forbid smb1 in samba settings.

min protocol=SMB2
max protocol=SMB3
client min protocol=SMB2
client max protocol=SMB3

Nextcloud uses smbclient calls (no php modules)

My "External storage support" V1.12.1 with SMB/CIFS Share point to 127.0.0.1.

If I enable App "External storage support"

I receive one correct info and hundreds warnings with SMB1 (about 5 warnings per minutes)

User [xxxxx] from [xxxxx(127.0.0.1)] via [CIFS(SMB3)] accessed shared folder [xxx]. Host [127.0.0.1] failed to connect via [SMB] due to [SMB1 not permitted]. Host [127.0.0.1] failed to connect via [SMB] due to [SMB1 not permitted]. Host [127.0.0.1] failed to connect via [SMB] due to [SMB1 not permitted]. Host [127.0.0.1] failed to connect via [SMB] due to [SMB1 not permitted]. Host [127.0.0.1] failed to connect via [SMB] due to [SMB1 not permitted].

After disable App "External storage support" no infos or warning appears.

On Synology Nas terminal with

smbclient -L 127.0.0.1 -U ***

I get a SMB3_00 connection with smbstatus SMB3 client and servers works on Synology Diskstation.

(Or after allow smb1 in settings no warnings appears. But this is no option for me)

Errormessage for occ files_external:notify 1

smbXcli_negprot_smb1_done: No compatible protocol selected by server. Protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE

In SMB.php line 645: /xxx/yyy/.nc_test_folder In Exception.php line 46: /xxx/yyy/.nc_test_folder

I think the App "External storage support" only use at first contact a SMB3 connection and switch to SMB1 for further requests.

markushub commented 1 year ago

Update NC to 25.0.1 and Synology to DSM 7.1.1-42962 Update 2 with smbclient Version 4.10.18 and the problem still exists.

It's time to update nextcloud external storage!

szaimen commented 1 year ago

Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you!

Blobster21 commented 1 year ago

Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you!

Running 25.0.2 here , i added an external storage ( samba share on an older Synology with the 6.2.4-25556 Update 6 DSM version) and it works : i have access to it.

szaimen commented 1 year ago

Thanks for verifying!