external_storage: smb 2/3 setting but logging a lot of failed smb1 connections
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
Nextcloud produces a lot of SMB1 warnings.
- create SMB/CIFS Share
- enable App "External storage support"
- view samba logfile
- receive one correct info and hundreds warnings with SMB1
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.
Expected behaviour
Nextcloud "app" external_storage: should not try to connect with smb1
External Storage should first to connect with smb3 and after success, not with smb1
Actual behaviour
Inside "External storage support" there is a problem with smb Connection.
On synology nas terminal with
smbstatus
I get only SMB3_00 connection
SMB3 client and servers works on Synology Diskstation.
But after enable App "External storage support" one connection with smb3 start and a lot of denied connections with smb1.
I can receive files from the samba share.
The samba share is read only.
Server configuration
Operating system:
Synology Nas
Web server:
Apache 2.4
Database:
mysql 10.3.29
PHP version:
7.4.9
Nextcloud version: (see Nextcloud admin page)
Nextcloud 22.2.0
Updated from an older Nextcloud/ownCloud or fresh install:
Nextcloud 22.1.0
Where did you install Nextcloud from:
https://download.nextcloud.com/server/releases/nextcloud-*.tar.bz2
Signing status:
No errors have been found.
List of activated apps:
App list
Enabled: - accessibility: 1.8.0 - activity: 2.15.0 - apporder: 0.13.0 - bookmarks: 10.0.0 - calendar: 2.3.4 - circles: 22.1.1 - cloud_federation_api: 1.5.0 - comments: 1.12.0 - contacts: 4.0.3 - contactsinteraction: 1.3.0 - cookbook: 0.9.5 - dashboard: 7.2.0 - dav: 1.19.0 - deck: 1.5.3 - federatedfilesharing: 1.12.0 - files: 1.17.0 - files_external: 1.13.0 - files_markdown: 2.3.4 - files_pdfviewer: 2.3.0 - files_readmemd: 1.2.0 - files_rightclick: 1.1.0 - files_sharing: 1.14.0 - files_trashbin: 1.12.0 - files_versions: 1.15.0 - files_videoplayer: 1.11.0 - firstrunwizard: 2.11.0 - gpxpod: 4.2.8 - health: 1.3.0 - logreader: 2.7.0 - lookup_server_connector: 1.10.0 - mail: 1.10.5 - maps: 0.1.9 - metadata: 0.14.0 - news: 16.1.0 - nextcloud_announcements: 1.11.0 - notes: 4.1.1 - notifications: 2.10.1 - oauth2: 1.10.0 - password_policy: 1.12.0 - passwords: 2021.10.20 - phonetrack: 0.6.9 - photos: 1.4.0 - privacy: 1.6.0 - provisioning_api: 1.12.0 - quota_warning: 1.11.0 - recommendations: 1.1.0 - serverinfo: 1.12.0 - settings: 1.4.0 - sharebymail: 1.12.0 - socialsharing_email: 2.2.0 - spreed: 12.1.2 - systemtags: 1.12.0 - tasks: 0.14.2 - text: 3.3.0 - theming: 1.13.0 - twofactor_backupcodes: 1.11.0 - twofactor_totp: 6.1.0 - updatenotification: 1.12.0 - user_status: 1.2.0 - viewer: 1.6.0 - weather_status: 1.2.0 - workflowengine: 2.4.0 Disabled: - admin_audit - audioplayer - audioplayer_editor - cospend - encryption - federation - files_mindmap - forms - geoblocker - polls - support - survey_client - timemanager - user_ldapNextcloud configuration:
Config report
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder
or
Insert your config.php content here.
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)
Are you using external storage, if yes which one: local/smb/sftp/...
smb
samba settings
min protocol=SMB2
max protocol=SMB3
client min protocol=SMB2
client max protocol=SMB3
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no
With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder
Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';
Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.
Client configuration
Its a server issue
Browser:
Operating system:
Logs
Web server error log
Web server error log
Insert your webserver log here
Nextcloud log (data/nextcloud.log)
Nextcloud log
Insert your Nextcloud log here
Browser log
Browser log
Insert your browser log here, this could for example include:
a) The javascript console log
b) The network log
c) ...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the files_external app's SMB connection path and reproduce the behavior while monitoring the Samba log and smbstatus. Compare the configured SMB2/SMB3 limits with the attempted SMB1 connections; done means a successful SMB3 connection no longer produces repeated SMB1 warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100