nextcloud / nextcloud/server

External storages gets duplicated when login changes

Open
#56,671 3 comments 0 reactions 1 assignee View on GitHub

@come-nc is already working on this.

Since Nov 25, 2025.

1. to develop 32-feedback 33-feedback bug feature: external storage feature: files high
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

This issue has to do with external storages like SMB, SFTP, FTP…

They can be configured to use credentials from the user, stored either in session or in DB.
They use the login and other parameter as part of the ID, so that different user get a different storage. But that cause an issue when the login of a user changes. This can happen when LDAP is used as a backend for instance, or when allowing email as well as login.

My first impulse to fix that was to use the user ID instead of the user login in the storage id. But the issue with that is that in some cases we want users to access the same global storage, and in this case it has the same id on purpose.

I guess we could use the user id instead of login only when using mechanism like "Log-in credentials, save in database".
But we could have the same issue with global credentials, if the login changes and the admin reconfigure it, it should not change id and lose metadata I suppose?

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.