nextcloud / nextcloud/server

[encryption] store keys by fileId instead of path

Open
#59,345 1 comment 2 reactions 1 assignee View on GitHub

@mejo- is already working on this.

Since Apr 16, 2026.

0. Needs triage enhancement feature: encryption (server-side)
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

[!TIP]

Help move this idea forward
  • Use the 👍 reaction to show support for this feature.
  • Avoid commenting unless you have relevant information to add; unnecessary comments create noise for subscribers.
  • Subscribe to receive notifications about status changes and new comments.

Is your feature request related to a problem? Please describe.
In Collectives, we can have different paths to a file by user (when a user changes their user_folder user setting). This leads to inaccessible files with server-side encryption as the encryption keys are stored by file path. The broken user experience is tracked in https://github.com/nextcloud/collectives/issues/2326 and https://github.com/nextcloud/collectives/issues/2284.

Describe the solution you'd like
In order to fix this, we should switch to fileId based key storage instead of file path based key storage.

Describe alternatives you've considered

  • We could use the storage path instead for ISystemMountPoint paths, but this would come with its own problems. E.g. appdata is excluded from encryption and Collectives files live in appdata directory.
  • We could introduce a way to map different user mountpoint paths to the same encryption key path.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.