Shared folder with same name starts override each other at recipient view

Docker image: nextcloud:24-fpm-alpine

The issue you are facing:
Multiple users share ‘_explorer’ folder to recipient user. As expected, recipient users start see folders as:

  • _explorer(2)
  • _explorer(3)
  • _explorer(4)
  • _explorer(5) (23 minutes ago)

Then next share happens form new user (13 minutes ago).
Expected was to see:

  • _explorer(6) (13 minutes ago)

Unfortunately there was an overwrite on, recipient user files:

_explorer(5) (23 minutes ago) --> _explorer(5) (13 minutes ago)

Since now, each new user share: overrides folder:
instead of creating:

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it (looks like random but):

  1. Share folder with same name from ‘multiple users’ to ‘recipient user’

The outputs:

No errors, logs connected to issue. Fresh docker installation.


I will be grateful for any hints

I’m not sure what you are doing there, but I would suggest avoiding the name collisions to begin with.

If only one account is receiving all these shares, I believe you can rename or move the folder just on the receiving side.

This is a major issue and its is also a major digital security risk that could be exploited to easily inject malicious files in others’ users folder.

But irrespective of this, users that share their (default) folders should not have to worry about name collisions. This is a bug that needs to be reported.

Bug reported submitted: [Bug]: Name collision of shared folders and potential security exploit · Issue #34015 · nextcloud/server · GitHub