core icon indicating copy to clipboard operation
core copied to clipboard

A folder shared with two groups appears twice for an user in these two groups.

Open phlb opened this issue 12 years ago • 25 comments

Hello,

When I try to share a folder with two groups, if a user is in these two groups, the user show the folder twice.

Steps to reproduce

  • create user 'test1'
  • create user 'test2'
  • create user 'test3'
  • create a group 'group1' with the user test1 test2 test3
  • create a group 'group2' with the user test1 test2
  • with the user test1, create a folder "myfolder"
  • with the user test1 share the folder "myfolder" with the group group1 without resharing neither modification allowed
  • with the user test1 share the folder "myfolder" with the group group2 without resharing and with modification allowed
  • login with the user test2

Expected behavior

With the user test2, the folder "myfolder" should appear only once and modification should be allowed.

Actual behaviour

With the user test2, the folder "myfolder" appears twice.

Server configuration

Operating system : Debian Wheezy

Database : postgresql 9.1.13-0wheezy1

php : 5.4.4-14+deb7u9

owncloud : owncloud 7 RC3 / owncloud 6.0.3

Updated from an older ownCloud or fresh install : Fresh install

List of activated apps : Default installation

phlb avatar Jul 18 '14 14:07 phlb

@schiesbn Can you have a look please?

karlitschek avatar Jul 18 '14 16:07 karlitschek

This gets even worse if you're using the desktop client (at least on Mac, i can confirm). When you're uploading some files to the share which has modifications enabled, the client instantly downloads everything again into the other share. So all files exist twice in these two folders. It seems OC does not recognize the physical folders as one but sees them as seperate ones.

foobarth avatar Aug 22 '14 06:08 foobarth

That's how the ownCloud sharing works since the beginning. So I wouldn't call it a bug. But I agree that we should change the behaviour and group the shares. I'm already working on it: https://github.com/owncloud/core/pull/10107

This includes some larger changes. Not sure if we want to change it for OC7 also because it is not really a bug, but it will definitely be ready for OC8.

schiessle avatar Aug 22 '14 08:08 schiessle

Strange, I tried these steps in OC 6.0.5 but the target user only gets a single entry. So I suppose this is OC 7 specific ? (the report mentionned OC 6.0.3)

PVince81 avatar Sep 04 '14 09:09 PVince81

Hi,

During my test in oc 6.0.3 sometimes the bug appears when I try to share a second folder through 2 groups. Sometimes the bug appears for the first folder.

phlb avatar Sep 04 '14 13:09 phlb

Yeah, from what we saw in the code the logic isn't very clear/clean. There might be combinations of share that might work, others that don't.

PVince81 avatar Sep 04 '14 16:09 PVince81

@MTRichards moved the tags from #10946 here. Set to next sprint for when @schiesbn is back.

PVince81 avatar Sep 09 '14 09:09 PVince81

Thanks @PVince81

https://github.com/owncloud/core/pull/10107 related?

Never mind, I see - related.

MTRichards avatar Sep 09 '14 13:09 MTRichards

👍 I'm experiencing the same behavior on 9.0.2

Folder Projects is shared as read-only with group A
Folder Projects/Project_Name is shared as read/write/share with group B

A user which belongs to both groups A and B, when accessing, will see the folder Projects/Project_Name twice in is home screen:

  1. with read-only access in Projects/Project_Name
  2. with read/write/share access as Project_Name

I would rater expect than he gets this Projects/Project_Name only, and he has group B permissions since they superseed group A. What do you think about it?

lamuertepeluda avatar May 12 '16 07:05 lamuertepeluda

@rullzer @schiesbn should we reopen or is there another ticket about "different permissions on group shares produces two recipient folders" ?

PVince81 avatar May 12 '16 08:05 PVince81

@PVince81 not sure. The main issue here is that grouping is not so trivial. And we miss a lot of info. We really should sit together and discuss this merging of shares. As it is not at all trivial..

rullzer avatar May 12 '16 11:05 rullzer

Ok, I'll reopen this ticket then. Not sure why it was closed though, maybe autoclosed through a PR. Last time we talked about it in some other ticket, I remember that we hadn't tackled the double folders due to different permissions.

PVince81 avatar May 12 '16 14:05 PVince81

Hi there

Same issue with OC 9.0.3. In OC 8 we haven't that problem. Thanks for your check and fix.

jammon88 avatar Jul 05 '16 07:07 jammon88

@jammon88 mind giving more details about your config and the way the shares are set up to confirm that it's the same issue ?

PVince81 avatar Jul 05 '16 07:07 PVince81

Of course:

Server: Ubuntu 14.04.04 Database: mysql Ver 14.14 Distrib 5.5.49 Webserver: Apache/2.4.7 Owncloud: 9.0.3

Share from a syncuser for LDAP synced groups. (two Groups)

Problem since update from OC 8.1.? to OC 9.0.3 with apt-get upgrade.

Config:

'mysql', 'version' => '9.0.3.2', 'dbname' => 'owncloud', 'dbhost' => 'localhost', 'dbtableprefix' => 'oc_', 'installed' => true, 'loglevel' => '2', 'forcessl' => true, 'ldapIgnoreNamingRules' => false, 'theme' => '', 'maintenance' => false, 'share_folder' => '/Shared', 'overwrite.cli.url' => '/owncloud', 'trashbin_retention_obligation' => 'auto', 'updatechecker' => false, 'memcache.local' => '\OC\Memcache\APCu', 'logtimezone' => 'Europe/Zurich', 'log_type' => 'owncloud', 'log_rotate_size' => 1048576, ); (rows with usernames, passwords, ids etc. I've deleted ;)) Do you need more infos? When yes, what?

jammon88 avatar Jul 05 '16 08:07 jammon88

@jammon88 thanks, can you check the steps from https://github.com/owncloud/core/issues/9724#issue-38183197 whether it matches your sharing setup.

Or provide steps how to recreate the sharing situation you have on your server. There are different versions of this issue (some involving different permissions), I just wanted to make sure which one it is. Thanks.

PVince81 avatar Jul 05 '16 08:07 PVince81

We have different permissions, like in the post above. Group 1 has all right, Group 2 only read right. In the sharing folder named "shared" from the syncuser I've all right, in the sharing named "shared (1)" (looks like a linked folder) I've only read right with my personal user.

jammon88 avatar Jul 05 '16 08:07 jammon88

Okay, thanks for the info.

PVince81 avatar Jul 05 '16 08:07 PVince81

Hello, is it there any solution for this yet? I am having this problem on version 9.0.3

neoone256 avatar Jul 11 '16 20:07 neoone256

Confirmed again, would seem to have regressed in 9.0.3.

If I am in 2 groups to which a folder is shared, the folder appears twice.

In my case both groups have the same permission.

  • User A creates folder Public.
  • User B is a member of Group X and Group Y.
  • User A shares folder to Group X and Group Y with same permissions (full access).
  • User B sees 2 folders, Public and Public (2).

Not sure if it's relevant, but in my case, Group X is an LDAP group and Group Y is an internal group with LDAP users in it.

norganna avatar Jul 12 '16 06:07 norganna