Skip to content

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

Merged
DerDreschner merged 1 commit into
stable34from
backport/64872/stable34
Nov 4, 2026
Merged

DerDreschner merged 1 commit into
stable34from
backport/64872/stable34

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.

@backportbot
backportbot Bot requested review from DerDreschner and susnux November 4, 2026 18:09
@backportbot backportbot Bot added this to the Nextcloud 34.0.6 milestone Nov 4, 2026
@DerDreschner
DerDreschner force-pushed the backport/64872/stable34 branch from 2b065d6 to 718be40 Compare November 4, 2026 18:21
@DerDreschner
DerDreschner marked this pull request as ready for review November 4, 2026 18:21
@DerDreschner
DerDreschner requested a review from a team as a code owner November 4, 2026 18:21
@DerDreschner
DerDreschner requested review from leftybournes and salmart-dev and removed request for a team November 4, 2026 18:21
@DerDreschner
DerDreschner force-pushed the backport/64872/stable34 branch from 718be40 to 76bdf91 Compare November 4, 2026 19:32
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>
@AndyScherzinger
AndyScherzinger force-pushed the backport/64872/stable34 branch from 76bdf91 to ab8e116 Compare November 4, 2026 21:51
@DerDreschner
DerDreschner merged commit ec46724 into stable34 Nov 4, 2026
184 of 186 checks passed
@DerDreschner
DerDreschner deleted the backport/64872/stable34 branch November 4, 2026 22:58
@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
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.

2 participants