Skip to content

Conversation

@danxuliu
Copy link
Member

See #51846

⚠️ ⚠️ ⚠️ So far only the tests were added, the bug still needs to be fixed (and I would need someone to take over 🤷 Maybe @icewind1991 or @artonge ? Thanks!) ⚠️ ⚠️ ⚠️

After 199b0bd if a received share was copied, or if a file was copied from a received shared folder without delete permissions, the copied file could not be deleted. The problem seems to be that the cache of the files copied from a storage (like a share) is also copied, so the permissions of the copied file are the same as the permissions of the original file. The regression appeared only for files copied to a local storage; files copied to an object store retained their permissions already before that commit, unless it was explicitly disabled by setting handleCopiesAsOwned.

Note that single file shares do not have the delete permission, so it happened even without explicitly disabling it (and, in fact, it is not even possible to explicitly enable it, it is always disabled).

For reference, both when copying a received share and when copying a file from a received shared folder if the file is copied in a local storage the permissions can be fixed by rescanning it with occ files:scan (or occ groupfolders:scan if it is copied into a group folder). On the other hand, this has no effect when using an object store.

In the case of single file shares the bug was fixed (or, at least, the first test passes, maybe there are other cases) with 88c685f when using an object store, and with 6419de7 when using local storage, but it is still present in both cases when copying files from a received shared folder without delete permissions (second test).

As the scenarios were added to dav_features/webdav-related.feature they are also run with an object store as primary storage in CI. Note that handleCopiesAsOwned is not set), but as mentioned the first test passes nevertheless after 88c685f.

Note that the delete permission is implicitly disabled in the first test
because the delete permission is automatically removed for single file
shares.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu added this to the Nextcloud 32 milestone May 20, 2025
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants