nextcloud / server

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

[Bug]: `occ files:scan --all` scans the same samba share again and again for every user #46205

Open PaulStogov opened 4 months ago

PaulStogov commented 4 months ago

⚠️ This issue respects the following points: ⚠️

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.

image

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

  1. Add an SMB/CIFS storage in "External storage" setting.
  2. Make it "Available for" a number of users.
  3. Run occ files:scan --all command

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?

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

PaulStogov commented 4 months ago

Some illustrations. Scan time with the SMB share unavailable: image Scan time with the SMB share connected: image It took 7+ hrs more. And the contents of the SMB share is like this: image So it is easily calculable five times overhead.

SystemKeeper commented 4 months ago

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

PaulStogov commented 4 months ago

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":

image

Or it should be "all people" checked?