Skip to content

fix: move/copy to share subfolder fails with PROPFIND 404 (regression from v4→v7) #3374

Description

@IronWERTY

Description

Moving or copying a file to a subfolder within a received share fails with two PROPFIND 404 errors:

PROPFIND https:///dav/spaces/k2 → 404
PROPFIND https:///dav/spaces/f1/k2 → 404

Moving to the share root works correctly. Moving to subfolders is broken.

Root Cause

In useGetMatchingSpace.ts, getMatchingSpace() uses resource.storageId to find
the matching space. For a subfolder inside a share, storageId is derived as
storageID$spaceID (by splitting fileId on !). However, the share space has
id = storageID$spaceID!rootNodeID — so the lookup never matches.

The fallback then creates a broken share space with id = undefined
(because resource.remoteItemId is not set for subfolders), resulting in
webDavPath = '/spaces' and destination URL /dav/spaces/<folderName>.

Fix

This was already fixed in owncloud/web:

The fix changes one line in packages/web-pkg/src/composables/spaces/useGetMatchingSpace.ts:

- let storageId = resource.storageId
+ let storageId = resource.spaceId
(plus adds SpaceId DAV property and populates resource.spaceId in buildResource)

Steps to Reproduce

1. User A shares folder f1 (which contains subfolder k2) with User B
2. User B opens the share, selects a file inside f1/k2/j1/
3. User B tries to move the file to k2 → fails with PROPFIND 404

Version

OpenCloud 7.2.4 (regression introduced in v4→v7 upgrade, worked in v4.0.6)

Activity

  1. AlexAndBear commented on Sep 27, 2026

    @AlexAndBear
    Member

    Thanks for the detailed report and root-cause analysis — I could reproduce it locally.

    Unfortunately the linked ownCloud fix won't solve it for OpenCloud. It switches getMatchingSpace() from resource.storageId to resource.spaceId, but for a subfolder inside a share, the server returns the owner's space as oc:spaceid (e.g. <storage>$<owner-space>), which is the same value storageId already holds. The recipient doesn't have that space; they only have the share space (<storage>$<owner-space>!<share-root-node>), so the lookup still fails and falls back to a share space with id = undefined. The Graph part of that fix (remoteItem.spaceId) doesn't exist in the OpenCloud libre-graph API either.

    The actual problem is on our side: since move/copy use the location picker (web v7.1.4), the picked target folder is resolved via getMatchingSpace(). For subfolders of a share, that folder lacks the remoteItemId pointing to the share space; only the share root has it, which is why moving there works. We'll fix it by attaching the share space to the target folder.

  2. self-assigned this
    on Sep 27, 2026
  3. moved this from Qualification to In Progress in OpenCloud Team Boardon Sep 27, 2026
  4. IronWERTY commented on Sep 29, 2026

    @IronWERTY
    Author

    thanks for an explanation! will it be implemented in new release? or how long should it take?

  5. added
    backport-required
    on Sep 30, 2026
  6. AlexAndBear commented on Sep 30, 2026

    @AlexAndBear
    Member

    thanks for an explanation! will it be implemented in new release? or how long should it take?

    We will backport it to the stable release, can't tell you an exact time span, but it won't take too long

  7. added this to the next-stable milestone on Oct 7, 2026
  8. IronWERTY commented on Oct 13, 2026

    @IronWERTY
    Author

    is it ready to deploy? and which version of docker image? Thanks

  9. v-scharf commented on Oct 13, 2026

    @v-scharf
    Contributor

    The fix is already included in the latest rolling release (opencloud-rolling 8.1.0).

    For the stable release, it’s on our list for the next 7.2.x patch release together with a few other fixes, and you can track it here: OpenCloud Team Board (view)
    I'll let you know when we release it.

  10. assigned and unassigned on Oct 27, 2026
  11. modified the milestones: next-stable, 7.2.4 on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Priority:p2-highType:BugType:Regressionbackport-required

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions