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

[Bug]: Shared Collectives cause "Path not found" when scannig files with "occ files:scan --all" #42496

Open
5 of 8 tasks
arnowelzel opened this issue Dec 27, 2023 · 0 comments · May be fixed by #42497
Open
5 of 8 tasks

Comments

@arnowelzel
Copy link
Contributor

⚠️ This issue respects the following points: ⚠️

Bug description

When a Collective is shared with one or more users and you start a manual file scan using occ files:scan --all, this leads to the following error message for each user who is member of a Collective circle:

Path not found: /username

Where username is the name of the affected user.

Steps to reproduce

  1. Create a collective
  2. Share it with at least one other user
  3. Run occ files:scan --all in a terminal

Expected behavior

occ files:scan --all runs without "Path not found" error messages

Installation method

Community Manual installation with Archive

Nextcloud Server version

28

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • 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

There is a workaround to fix this. In /server/lib/private/Files/Utils/Scanner.php the following code needs to be added, so Collectives mounts will be ignored during a file scan:

            // don't scan received local shares, these can be scanned when scanning the owner's storage
            if ($storage->instanceOfStorage(SharedStorage::class)
                || $storage->instanceOfStorage(CollectiveStorage::class)
            ) {
                continue;
            }

Also see https://help.nextcloud.com/t/occ-files-scan-outputs-path-not-found-for-some-users/177507/12 and

// don't scan received local shares, these can be scanned when scanning the owner's storage
if ($storage->instanceOfStorage(SharedStorage::class)) {
continue;

@arnowelzel arnowelzel added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Dec 27, 2023
@arnowelzel arnowelzel linked a pull request Dec 27, 2023 that will close this issue
4 tasks
@joshtrichards joshtrichards added feature: filesystem feature: occ 28-feedback feature: circles Related to circles 3. to review Waiting for reviews and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants