Skip to content

fix: Don't apply the ACL wrapper to trash storage on separate storages - #5054

Open
solracsf wants to merge 1 commit into
masterfrom
fix/no-acl-wrapper-on-trash-storage
Open

solracsf wants to merge 1 commit into
masterfrom
fix/no-acl-wrapper-on-trash-storage

Conversation

@solracsf

Copy link
Copy Markdown
Member

getBaseStorageForFolderRootJail() skips the ACL wrapper for the trash storage because the trash backend does its own ACL filtering. The separate storage path never got the same guard, and createFolder() always uses separate storages now.

ACLStorageWrapper sits below the jail, so its unlink() runs canDeleteTree() over the trash paths. A deny delete rule follows a file's id into the trash, so permanently deleting the folder that file was in fails with Failed to remove item from trashbin, even though the trash backend already allowed the delete.

@solracsf solracsf added 3. to review Items that need to be reviewed feature: acl Items related to the groupfolders ACL or "Advanced Permissions" labels Aug 26, 2026
getBaseStorageForFolderRootJail() skips the ACL wrapper for the trash storage
because the trash backend does its own ACL filtering, but the separate storage
path never got the same guard. createFolder() always uses separate storages
now, so every recently created folder ends up with the wrapper on its trash.

The visible effect is a permanent delete that can never succeed.
ACLStorageWrapper sits below the jail, so it sees the trash paths, and its
unlink() runs canDeleteTree() over them. A deny delete rule follows a file's id
into the trash, so permanently deleting the folder that file was in fails with
"Failed to remove item from trashbin", even though the trash backend already
decided the user is allowed to delete that item.

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
@solracsf
solracsf force-pushed the fix/no-acl-wrapper-on-trash-storage branch from 93f6f49 to fb709bc Compare August 26, 2026 18:28
@solracsf solracsf added this to the Nextcloud 36 milestone Aug 26, 2026
@solracsf solracsf added the feature: trashbin Items related to the trashbin feature label Aug 26, 2026
@solracsf solracsf self-assigned this Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Items that need to be reviewed backport-request bug feature: acl Items related to the groupfolders ACL or "Advanced Permissions" feature: trashbin Items related to the trashbin feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant