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

occ files:scan scans the same group folders for every user #3278

Open
4 of 8 tasks
theinfguy opened this issue Feb 4, 2022 · 6 comments
Open
4 of 8 tasks

occ files:scan scans the same group folders for every user #3278

theinfguy opened this issue Feb 4, 2022 · 6 comments
Labels
1. to develop Issues that are ready for development bug feature: files Files integration

Comments

@theinfguy
Copy link

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

I have noticed that running occ: files:scan includes whatever group folders the user is a member of as well.

This makes for incredibly slow scanning, especially if you have 30+ users and use the --all option. The same group folders are scanned over 30 times.

Steps to reproduce

  1. Run occ files:scan on an installation with multiple users belonging to the same group folders.

Expected behavior

Group folders should be scanned separately to avoid the files:scan --all command scanning the same files over and over.

Installation method

No response

Operating system

No response

PHP engine version

No response

Web server

No response

Database engine version

No response

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

No response

Are you using the Nextcloud Server Encryption module?

No response

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

Enabled:
  - accessibility: 1.8.0
  - activity: 2.15.0
  - admin_audit: 1.12.0
  - circles: 22.1.1
  - cloud_federation_api: 1.5.0
  - comments: 1.12.0
  - contactsinteraction: 1.3.0
  - dashboard: 7.2.0
  - dav: 1.19.0
  - deck: 1.5.5
  - federatedfilesharing: 1.12.0
  - federation: 1.12.0
  - files: 1.17.0
  - files_pdfviewer: 2.3.1
  - 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
  - groupfolders: 10.0.0
  - logreader: 2.7.0
  - lookup_server_connector: 1.10.0
  - nextcloud_announcements: 1.11.0
  - notifications: 2.10.1
  - oauth2: 1.10.0
  - password_policy: 1.12.0
  - photos: 1.4.0
  - privacy: 1.6.0
  - provisioning_api: 1.12.0
  - recommendations: 1.1.0
  - serverinfo: 1.12.0
  - settings: 1.4.0
  - sharebymail: 1.12.0
  - support: 1.5.0
  - survey_client: 1.10.0
  - systemtags: 1.12.0
  - text: 3.3.0
  - theming: 1.13.0
  - twofactor_backupcodes: 1.11.0
  - twofactor_totp: 6.2.0
  - updatenotification: 1.12.0
  - user_status: 1.2.0
  - viewer: 1.6.0
  - weather_status: 1.2.0
  - workflowengine: 2.4.0
Disabled:
  - encryption
  - files_external
  - user_ldap

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

@theinfguy theinfguy added 0. Needs triage Issues that need to be triaged bug labels Feb 4, 2022
@szaimen
Copy link
Contributor

szaimen commented Feb 4, 2022

cc @icewind1991 @CarlSchwan

@Ornanovitch
Copy link

I can confirm this behavior on NC 24.0.1 and group folders 12

@PVince81
Copy link
Member

PVince81 commented Jun 17, 2022

it should be possible to extend this logic to also include group folder https://github.com/nextcloud/server/blob/master/lib/private/Files/Utils/Scanner.php#L225 and change the class name to the one of group folder storage, make sure to use a string as class name for the cases where the app is not enabled

PR welcome

@PVince81 PVince81 added 1. to develop Issues that are ready for development and removed 0. Needs triage Issues that need to be triaged labels Jun 17, 2022
@szaimen szaimen added enhancement and removed bug labels May 22, 2023
@szaimen
Copy link
Contributor

szaimen commented May 22, 2023

This sounds like a feature request to me to not include group folders in the scan

@joshtrichards joshtrichards added the good first issue Small tasks with clear documentation about how and in which place you need to fix things in. label Sep 4, 2023
@joshtrichards joshtrichards changed the title occ files:scan includes group folders for every user occ files:scan scans the same group folders for every user Sep 4, 2023
@Ornanovitch
Copy link

Ornanovitch commented May 24, 2024

This sounds like a feature request to me to not include group folders in the scan

I think the solution would not be to exclude group folders from the scan, but to include those properly. As the OP says, "group folders should be scanned separately", ie as they are in the file system: separated folders.

IMO this kind of behavior is symptomatic of how the group folders tend to be treated in part of the NC ecosystem: as a second-class object, not entirely integrated into the usual files processes. Another example: nextcloud/desktop#1967 : desktop client considers group folders as external storage

@joshtrichards joshtrichards transferred this issue from nextcloud/server Sep 25, 2024
@provokateurin
Copy link
Member

Thanks for transferring @joshtrichards, this makes perfect sense to fix!

@provokateurin provokateurin added bug feature: files Files integration and removed enhancement good first issue Small tasks with clear documentation about how and in which place you need to fix things in. labels Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Issues that are ready for development bug feature: files Files integration
Projects
None yet
Development

No branches or pull requests

6 participants