Skip to content

[stable33] fix(quota): Calculate used quota for foreign users the correct way - #66334

Merged
AndyScherzinger merged 1 commit into
stable33from
backport/64872/stable33
Nov 4, 2026
Merged

AndyScherzinger merged 1 commit into
stable33from
backport/64872/stable33

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Backport of #64872

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Review and verify the backported changes
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

When the `quota_include_external_storage` setting is enabled and a shared folder is mounted, the free space is being calculcated the wrong way.

Example:
- user1 has a quota of 10GB with 9GB used
- user2 has a quota of 5GB and shares a folder with user1
- user1 tries to write a file to the shared folder
- Upload fails due to `quota-available-bytes: 0` (the usage of 9GB being compared against the 5GB of user2)

The issue is fixed by checking the usage of the folder's owner instead of the session user's. The same issue also applies to the admin overview, where the admin's own quota is being shown for users whose files folder is an external storage mounted at `/`.

Assisted-by: ClaudeCode:claude-opus-5.5
Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
@DerDreschner
DerDreschner force-pushed the backport/64872/stable33 branch from 51e6eff to 2f258ee Compare November 4, 2026 18:30
@DerDreschner
DerDreschner marked this pull request as ready for review November 4, 2026 18:30
@DerDreschner
DerDreschner requested a review from a team as a code owner November 4, 2026 18:30
@DerDreschner
DerDreschner requested review from icewind1991 and provokateurin and removed request for a team November 4, 2026 18:30
@AndyScherzinger
AndyScherzinger merged commit e9753e6 into stable33 Nov 4, 2026
180 of 189 checks passed
@AndyScherzinger
AndyScherzinger deleted the backport/64872/stable33 branch November 4, 2026 21:51
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically locked because it has been closed for more than 7 days. As we do not monitor merged or closed pull requests, we are locking this pull request to prevent further comments from getting lost in the noise.
If you discovered any issues with this pull request, please open a new issue instead. In case you want to discuss this pull request or have further questions, please use our forum: https://help.nextcloud.com

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 12, 2026
@come-nc

come-nc commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

/backport to stable32

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants