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

Colliding ACL rules when user is in multiple groups #598

Open
SimJoSt opened this issue Sep 10, 2019 · 6 comments
Open

Colliding ACL rules when user is in multiple groups #598

SimJoSt opened this issue Sep 10, 2019 · 6 comments
Labels
1. to develop Issues that are ready for development bug feature: acl Items related to the groupfolders ACL or "Advanced Permissions"

Comments

@SimJoSt
Copy link
Contributor

SimJoSt commented Sep 10, 2019

We use ACLs for a group folder. This folder is available to multiple groups. Some users are in multiple of those groups.

Some folders have ACL permissions set to prevent one user group to access it, while the other group should still be able to access it, as inherited from the folder above it.
The users in multiple of the groups now don't have access to this specific folder.

Do this permissions work in an "and" or an "or" way? And can the behaviour be changed?

@icewind1991
Copy link
Member

icewind1991 commented Sep 17, 2019

If a user has multiple ACL rules matching for a single folder they work in an "or" way (so "allow" overwrites "deny")

@ChrissW-R1
Copy link

If a user has multiple ACL rules matching for a single folder they work in an "or" way (so "allow" overwrites "deny")

That is not right. We have a setting, in which the user is in different groups, with colliding permissions. And the users don't have allowed permissions.

We use this structure:
root
├─┬─ company_a
│ ├─ department_a1
│ └─ department_a2
├─┬─ company_b
│ ├─ department_b1
│ ├─ department_b1
│ └─ department_b3
└─┬─ company_c
└─ department_c1

Everyone employee should be able to read only everything in his company share. But rights to write should only enabled for the department folder(s), of the assigned department(s) the user is a member of.

image

Sure it is possible, that we configured something wrong, but we have no idea what. Any tips?

@putt1ck
Copy link

putt1ck commented Mar 25, 2020

I've just worked through this for a customer so hopefully this will help:

at groupfolder level grant to the relevant groups the maximum permission the organisation would ever want members of that group to have in the groupfolder (where groupfolder means everything within it, whether subfolders or files, no matter how many levels of subfolders are intended);
with the share tab of the groupfolder (as a user in a group with permission to use advanced permissions) add any additional restrictions you want at that level e.g. in a scenario for company information you probably want only a few individuals to create new subfolders, so you grant them those permissions and then add rules for the groups to restrict to read only;
then on the desired subfolders add rules to grant back permissions to users or groups as needed and so on down the tree.

NB when a user is in more than one group where one has more relaxed permissions then you need a rule for both groups.

@pierreozoux pierreozoux added feature: acl Items related to the groupfolders ACL or "Advanced Permissions" bug labels Mar 14, 2021
@pierreozoux pierreozoux added the 0. Needs triage Issues that need to be triaged label Mar 28, 2021
@fschrempf
Copy link
Contributor

fschrempf commented Nov 4, 2021

It sounds like this is the problem also described in #1212. A potential fix is in #1654. Please confirm that this would fix the issue. If possible, test/review the mentioned PR.

Even without this PR the workflow described by @putt1ck above works fine. It's not really intuitive and straightforward, though.

@fschrempf
Copy link
Contributor

If a user has multiple ACL rules matching for a single folder they work in an "or" way (so "allow" overwrites "deny")

Yes, but this should also apply to inherited permissions from a parent folder, which is currently not the case and causes a lot of confusion and extra rules needed. The rules should be inherited per user/group. See #1654 for a solution.

@rubentolosa
Copy link

I'm in Nextcloud 26 and Group folders 14.0.3 and I think I'm facing the same bug.

If I give advanced permissions (write) in a folder to a user that already is in a group without write permissions, he can write to that folder and "see" that has permissions inherited on subfolders. But it is not true, subfolders are not writtable for him.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Issues that are ready for development bug feature: acl Items related to the groupfolders ACL or "Advanced Permissions"
Projects
None yet
Development

No branches or pull requests

8 participants