occ files_external:notify doesn’t work with SMB2
Steps to reproduce
- Add external shared folder sitting on the Windows Server 2012 with SMB1 enabled for AD users in Nextcloud - added successfully and users have access to the folder. Run "sudo -u www-data php /var/www/nextcloud/occ files_external:notify -u domin/user -p password" and the notify is working fine.
- Disable SMB2 on the windows server, add "client min protocol = SMB2" and "client max protocol = SMB3" to smb.conf and Nextcloud users have access to the shared folder
- run sudo -u www-data php /var/www/nextcloud/occ files_external:notify -u domin/user -p password
Expected behaviour
sudo -u www-data php /var/www/nextcloud/occ files_external:notify -u domin/user -p password will work
Actual behaviour
Error message: [Icewind\SMB\Exception\RevisionMismatchException] Notify is not supported with the used smb version
Server configuration
Operating system: Ubunu 16.04 Web server: Apache 2 Database: MySQL PHP version: 7.0.30 Nextcloud version: (see Nextcloud admin page) 13.0.4 Updated from an older Nextcloud/ownCloud or fresh install: updated from 13.0.0 Beta Where did you install Nextcloud from: https://download.nextcloud.com
GitMate.io thinks possibly related issues are https://github.com/nextcloud/server/issues/8487 (files_external:notify), https://github.com/nextcloud/server/issues/7913 (files_external notify), https://github.com/nextcloud/server/issues/3524 (occ files_external:notify does not propogate changes to clients.), https://github.com/nextcloud/server/issues/8148 (occ files:scan doesn't work correctly with group folders), and https://github.com/nextcloud/server/issues/10097 (occ files_external:notify exits spontaneously).
Sorry I forgot to add trace: Exception trace: () at /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Exception /Exception.php:32 Icewind\SMB\Exception\Exception::fromMap() at /var/www/nextcloud/apps/files_ext ernal/3rdparty/icewind/smb/src/NotifyHandler.php:96 Icewind\SMB\NotifyHandler->checkForError() at /var/www/nextcloud/apps/files_ext ernal/3rdparty/icewind/smb/src/NotifyHandler.php:54 Icewind\SMB\NotifyHandler->getChanges() at /var/www/nextcloud/apps/files_extern al/lib/Lib/Notify/SMBNotifyHandler.php:83 OCA\Files_External\Lib\Notify\SMBNotifyHandler->getChanges() at /var/www/nextcl oud/apps/files_external/lib/Command/Notify.php:220 OCA\Files_External\Command\Notify->selfTest() at /var/www/nextcloud/apps/files_ external/lib/Command/Notify.php:141 OCA\Files_External\Command\Notify->execute() at /var/www/nextcloud/3rdparty/sym fony/console/Command/Command.php:264 Symfony\Component\Console\Command\Command->run() at /var/www/nextcloud/core/Com mand/Base.php:161 OC\Core\Command\Base->run() at /var/www/nextcloud/3rdparty/symfony/console/Appl ication.php:874 Symfony\Component\Console\Application->doRunCommand() at /var/www/nextcloud/3rd party/symfony/console/Application.php:228 Symfony\Component\Console\Application->doRun() at /var/www/nextcloud/3rdparty/s ymfony/console/Application.php:130 Symfony\Component\Console\Application->run() at /var/www/nextcloud/lib/private/ Console/Application.php:173 OC\Console\Application->run() at /var/www/nextcloud/console.php:90 require_once() at /var/www/nextcloud/occ:11
I just swapped out our file server at my company with one that uses an SMB2 minimum. With Wanacry out in the wild, I'd like to keep things that way. My shares did not connect initially, which was expected. The solution was to make SMB2 the minimum version on Nextcloud's php smbclient by editing smb.conf. This works immediately, but results in the following error when I try to run the files_external:notify command:
In Exception.php line 32:
Notify is not supported with the used smb version
Will this ever be enabled on SMB versions higher than 1? Would this be an smbclient issue?
Same issue here - Does not work with SMB2 - Do we have a workaround?
Make sure you're using php-smb with your webserver. Had better results.
Other than this, try to switch to smb3 :shrug:
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.