[Bug]: `occ files:scan --all` scans the same samba share again and again for every user
⚠️ This issue respects the following points: ⚠️
- [X] This is a bug, not a question or a configuration/webserver/proxy issue.
- [X] This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- [X] I agree to follow Nextcloud's Code of Conduct.
Bug description
TIL that running occ files:scan --all command scans over and over again the same SMB share attached to our NC installation and being available for a number of users for every single user account.
I got the same pair of errors for every user connected to that one network share. Is seems like a huge overhead for me to scan the same network drive over and over again.
Steps to reproduce
- Add an SMB/CIFS storage in "External storage" setting.
- Make it "Available for" a number of users.
- Run
occ files:scan --allcommand
Expected behavior
One network connected share over anyhow protocol must be scanned one time only.
Installation method
Other Community project
Nextcloud Server version
29
Operating system
Other
PHP engine version
PHP 8.3
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
- [X] Default user-backend (database)
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
Some illustrations.
Scan time with the SMB share unavailable:
Scan time with the SMB share connected:
It took 7+ hrs more.
And the contents of the SMB share is like this:
So it is easily calculable five times overhead.
Depends on how the share is made available to the users. See https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/external_storage/auth_mechanisms.html#considerations-for-shared-storage
Depends on how the share is made available to the users. See https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/external_storage/auth_mechanisms.html#considerations-for-shared-storage
Thank you very much for the reply, I read the doc you provided. But it seems for me that my case does not include "user specific authorization":
Or it should be "all people" checked?
I read the doc you provided. But it seems for me that my case does not include "user specific authorization":
This part from the docs:
If collaborative working on external storage is required, the authentication “Global credentials” has to be used.
So in your case, instead of Login and password.