Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notify failes without SMB v1 #56

Open
ariselseng opened this issue May 18, 2017 · 6 comments
Open

Notify failes without SMB v1 #56

ariselseng opened this issue May 18, 2017 · 6 comments

Comments

@ariselseng
Copy link
Contributor

ariselseng commented May 18, 2017

thrown in /tmp/smblisten/vendor/icewind/smb/src/Connection.php on line 91
PHP Fatal error:  Uncaught Icewind\SMB\Exception\ConnectException: Unknown error (protocol negotiation failed: NT_STATUS_CONNECTION_RESET) in /tmp/smblisten/vendor/icewind/smb/src/Connection.php:91
Stack trace:
#0 /tmp/smblisten/vendor/icewind/smb/src/Connection.php(58): Icewind\SMB\Connection->unknownError('protocol negoti...')
#1 /tmp/smblisten/vendor/icewind/smb/src/NotifyHandler.php(66): Icewind\SMB\Connection->read(Object(Closure))
#2 /tmp/smblisten/listen.php(27): Icewind\SMB\NotifyHandler->listen(Object(Closure))
#3 {main}
  thrown in /tmp/smblisten/vendor/icewind/smb/src/Connection.php on line 91

Edit: I am talking about the notify function here.

@ariselseng
Copy link
Contributor Author

if you put "client min protocol = SMB2" in smb.conf, you get the same result.
Now with the wannacry virus going on, many people are turning off SMB1, so this surely is a problem for many people.

@ariselseng ariselseng changed the title Failes without SMB v1 Notify failes without SMB v1 May 19, 2017
@ariselseng
Copy link
Contributor Author

If I put "client min protocol = SMB2" and "client min protocol = SMB3" under [global] in smb.conf I can connect and get no errors. But there is nothing being reported changed. With SMB1 on, it works fine.

@icewind1991
Copy link
Owner

This is an upstream limitation of smbclient which only implements notify for smb1

With 2.0.3 you should at least get a relevant error message

@theroch
Copy link

theroch commented Jan 30, 2019

This is an upstream limitation of smbclient which only implements notify for smb1

I can confirm this.
With smbclient 4.3.11 (it is the default for Ubuntu 16.04) or 4.7.6 (Ubuntu 18.04) and smb2 the notify command returns with _ NT_STATUS_REVISION_MISMATCH_

With an smbclient 4.9.3 and smb2 the notify command works.

But what is the first smbclient version which supports notify with smb2?

You can test your version of smbclient with:

smbclient //server/share -U user -m SMB2

then type:

notify <foldername>

If your version supports notify with smb2 the output will be empty until a change event occur.

@theroch
Copy link

theroch commented Jan 30, 2019

Maybe I found the first working smbclient version.
For smbclient 4.7.8 the release note contains something like
BUG #13382: smbclient: Fix broken notify.

Can somebody confirm this with a smbclient 4.7.8?

@lhurt
Copy link

lhurt commented Oct 3, 2019

works for me with version 4.10.8 and even SMB3 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants