Web UI Bug (User is not in the <group> group)

Hello hexparrot;

So I’ve found this bug in the MineOS Web UI where it doesn’t allow you to create a server (error is that the user isn’t in the group it’s being created under) however the user is in that specific group. I’ve done research on it but no real solutions. Well, I’ve found the solution to that problem. When creating a user, it’s uaually in 1 primary group with no secondaries, where the problem doesn’t occur (such as in the default mc username and group). But when using multiple groups, you will bump into this problem, unless you add the group twice. For example you create a user with the name as que123 with the primary group of test, and secondary of root and mc. Now you goto the UI and login as that user, then try creating a server in the group test, you will be greeted with that error. The only way to fix it is to have test listed as secondary also.

Summary: If you create a user with multiple groups, you cannot create a server in the primary group unless that primary group is also listed as a secondary group.

1 Like

I can confirm this bug, thanks. I suppose in my own testing always maintained the default, primary group of users (matching the username) and instead had all additional group memberships be supplemental groups. After all, that means all files ever created by that user (even if not minecraft stuff) will then be owned by that group.

Of course, in the interest of actually working the way it should, it should accommodate the steps you describe, and I can see the issue is here: mineos/mounts.py at master · hexparrot/mineos · GitHub

It turns out that getgrnam() only returns supplementary groups and doesn’t return the primary, so it’s a relatively small fix. Seeing as how it’s python mineos, though, it’s TBD when things will ever change when it comes to lines of code that can adversely affect thousands of users (who don’t know how to roll back) but only potentially help small edge cases. I want this fixed, too, but without reliable testing help, this stuff always will take a bit to get implemented.