Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doubled folders when receiving shares through two groups #24575

Closed
jonasheinisch opened this issue May 11, 2016 · 31 comments · Fixed by #25113
Closed

Doubled folders when receiving shares through two groups #24575

jonasheinisch opened this issue May 11, 2016 · 31 comments · Fixed by #25113

Comments

@jonasheinisch
Copy link

Steps to reproduce

  1. Create two usergroups G1 and G2
  2. Share a folder F with both groups
  3. Create a user U belonging to both groups G1 and G2
  4. Log in with U

Expected behaviour

User U will have folder F in his files.

Actual behaviour

User U has folder F two times in his files (one is named "F (2)").

Server configuration

Operating system: Debian 8.0

Web server: Apache 2.0

Database: MySQL

PHP version: 5.6.20

ownCloud version: 9.0.2

Updated from an older ownCloud or fresh install: fresh install

Where did you install ownCloud from: via official aptitude repo

Signing status (ownCloud 9.0 and above): No errors have been found.

List of activated apps:


  - activity: 2.2.1
  - activitydefaults: 0.1.0
  - comments: 0.2
  - dav: 0.1.6
  - direct_menu: 0.7.1
  - external: 1.2
  - federatedfilesharing: 0.1.0
  - federation: 0.0.4
  - files: 1.4.4
  - files_pdfviewer: 0.8.1
  - files_sharing: 0.9.1
  - files_texteditor: 2.1
  - files_trashbin: 0.8.0
  - files_versions: 1.2.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 14.5.0
  - notifications: 0.2.3
  - ownbackup: 0.3.8
  - provisioning_api: 0.4.1
  - systemtags: 0.2
  - templateeditor: 0.1
  - updatenotification: 0.1.0

The content of config/config.php:

<?php
$CONFIG = array (
  'updatechecker' => false,
  'instanceid' => 'qwerty',
  'passwordsalt' => '0815',
  'secret' => 'thisissecret',
  'trusted_domains' =>
  array (
    0 => 'www.xxx.de',
    1 => 'xxx.de',
  ),
  'datadirectory' => '/var/www/vhosts/xxx.de/httpdocs/data',
  'overwrite.cli.url' => 'https://www.xxx.de',
  'dbtype' => 'mysql',
  'version' => '9.0.2.2',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'owncloud',
  'dbpassword' => 'dbpass',
  'logtimezone' => 'UTC',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'mail_from_address' => 'info',
  'mail_smtpmode' => 'php',
  'mail_domain' => 'xxx.de',
  'theme' => 'mytheme',
);

Are you using external storage, if yes which one: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

@PVince81
Copy link
Contributor

Are you using different permissions ? If the permissions are the same, there is an algo that will merge the two folders.

@PVince81
Copy link
Contributor

@rullzer

@jonasheinisch
Copy link
Author

@PVince81 Yes, the permissions are identical.

@PVince81
Copy link
Contributor

Hmm, then it could be a regression

@PVince81 PVince81 added this to the 9.0.3-current-maintenance milestone May 11, 2016
@rullzer
Copy link
Contributor

rullzer commented May 11, 2016

I most likely broke it then.
Thinking now why and if I had a reason.

@PVince81
Copy link
Contributor

PVince81 commented Jun 1, 2016

@rullzer any update ?

@PVince81
Copy link
Contributor

I most likely broke it then.

@rullzer can you fix it then ?

rullzer added a commit that referenced this issue Jun 15, 2016
Fixes #24575

Note that this is a very limited solution and eventually we want smarter
merging!
@rullzer
Copy link
Contributor

rullzer commented Jun 15, 2016

PR incomming... but I actually don't know why this grouping isn't happening properly on 9.0 since I did not touch the mountpoint stuff then...

@PVince81 PVince81 changed the title Prevent doubled folders Doubled folders when receiving shares through two grups Jun 17, 2016
@PVince81 PVince81 changed the title Doubled folders when receiving shares through two grups Doubled folders when receiving shares through two groups Jun 17, 2016
@PVince81 PVince81 modified the milestones: 9.0.3, 9.0.4-current-maintenance Jun 30, 2016
@PVince81
Copy link
Contributor

PVince81 commented Jul 6, 2016

The PR in question is here #25113

PVince81 pushed a commit that referenced this issue Jul 7, 2016
Fixes #24575

Note that this is a very limited solution and eventually we want smarter
merging!
@vssware
Copy link

vssware commented Jul 11, 2016

The problem happened when I upgrade from 9.0.2 to 9.0.3,It does not exist in my 9.0.2.

@jochenwezel
Copy link

what can / should I do in the meantime safely until the patch is availble with build 9.0.4?

  1. delete these duplicated folders and just keep the very first, correct one in my list?
  2. keep everything untouched

PLEA: In both cases, the provided update should correct all wrong data (so that the many users of our instance don't have to waste additional time to get a cleanup of their directory/share structure)

@PVince81
Copy link
Contributor

  • add more integration tests about renaming/moving received grouped shared folders

@PVince81
Copy link
Contributor

PVince81 commented Jul 22, 2016

PVince81 pushed a commit that referenced this issue Jul 22, 2016
Fixes #24575

Note that this is a very limited solution and eventually we want smarter
merging!
@PVince81
Copy link
Contributor

Just to clarify, now using this ticket to track any kind of "folder shared through multiple ways to the same user" resulting in the "recipient sees the folders multiple times" issue.

@PVince81
Copy link
Contributor

PVince81 commented Jul 22, 2016

@SMITR1
Copy link

SMITR1 commented Jul 25, 2016

Hi I ran into another issue, I applied the temporary fix for the sharing issue but now my owncloud doesn't want to sync with my mobile devices(Webdav or mobile app). Gives a HTTP error... can you please advise?

DeepDiver1975 pushed a commit that referenced this issue Jul 26, 2016
* Group shares with same source and target

Fixes #24575

Note that this is a very limited solution and eventually we want smarter
merging!

* Add integration tests for merging received shares

* Improved share grouping readability + fixed test

* Add repair step for unmerged shares (WIP)

* Added more tests for sharing's MountProvider

* Group incoming shares for resharing in JS

* Adjust repair version check for unmerged shares

* Fix RepairUnmergedShares to not skip valid repair cases

The repair step was a bit overeager to skip repairing so it missed the
case where a group share exists without subshares but with an
additional direct user share.

* Add integration tests for double shares with rename in between

* Make share target consistent when grouping group share with user share

In some situations, a group share is created before a user share, and
the recipient renamed the received share before the latter is created.
In this situation, the "file_target" was already modified and the second
created share must align to the already renamed share.

To achieve this, the MountProvider now groups only by "item_source"
value and sorts by share time. This makes it so that the least recent
share is selected as super-share and its "file_target" value is then
adjusted in all grouped shares.

This fixes the issue where this situation would have different
"file_target" values resulting in two shared folders appearing instead
of one.
@PVince81
Copy link
Contributor

PVince81 commented Aug 8, 2016

@SMITR1 which ownCloud version do you have and which exact fix did you apply ? Depending on your ownCloud version, the fix is different. It is likely that you applied an incomplete fix.

@PVince81
Copy link
Contributor

The PR is ready for testing: #25543

Please help testing if you have a test system. (don't do it on a productive system as it increases the version)
The PR can be downloaded as patch: https://github.com/owncloud/core/pull/25543.patch

To test:

  • the repair routine must properly repair the duplicate shares using a "best guess" approach in case users decided to keep the duplicates
  • all newly created shares targetting the same user must be properly deduplicated.

@PVince81
Copy link
Contributor

Regarding the workaround while waiting for 9.0.5: you can safely delete the duplicates. The repair routine will still be able to figure out what to do.

@PVince81
Copy link
Contributor

Fix will be in 9.0.5 and 9.1.1.

@vssware
Copy link

vssware commented Aug 16, 2016

Great, Tks a lot!

On Aug 16, 2016, at 7:50 PM, Vincent Petry <notifications@github.com mailto:notifications@github.com> wrote:

Closed #24575 #24575.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub #24575 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/ACK4Gb9Xb8wOTiAjFJ9FheKDSY_kVvpGks5qgaPugaJpZM4IcEun.

@PVince81
Copy link
Contributor

PVince81 commented Aug 18, 2016

You can help testing with the 9.0.5 RC1: http://download.owncloud.org/community/testing/owncloud-9.0.5RC1.tar.bz2

@tavinus
Copy link

tavinus commented Jan 17, 2017

Sorry to reopen this, but I am still facing this problem on OC 9.1.2 (stable). Any ideas?

@PVince81
Copy link
Contributor

@tavinus please make a new ticket and post reproduction steps and details about the sharing scenario. Use the issue template for that: https://raw.githubusercontent.com/owncloud/core/master/.github/issue_template.md

@functionportal
Copy link

I can still reproduce this problem in 9.1.4.2. This issue needs to be reopened.

@PVince81
Copy link
Contributor

@craftyInstigator please make a new ticket and post reproduction steps and details about the sharing scenario. Use the issue template for that: https://raw.githubusercontent.com/owncloud/core/master/.github/issue_template.md.

Most important is to know what exact sharing scenario you are using and the order in which the shares were created as it might affect the outcome. There is one known issue: #25564, please check if it matches your scenario exactly.

@lock
Copy link

lock bot commented Aug 3, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants