Tough Problem

Hi,

I have a problem with MineOS and it is really hard to explain. Could someone help me via private message on skype, discord or anything like that? It’s about groups in the root.

Kind regards,

Tjardo

Try your best to explain; if you don’t explain now you’ll still have to explain when/if anyone actually sends you a private message anyways.

That message what you’ve sent about the groups is almost exactly what I need. But I don’t understand it haha. I really want to use MineOS but the multiple groups with multiple server permission just doesn’t work, I don’t know why. I already tried multiple tutorials.


Okay so first, let’s create some users and groups for the example I’m about to make up:

Users

one:one
two:two

Groups

group1

Currently user one is part of the one group and can see any/all servers that are in the one group.
Likewise for user two; user two is part of the two group and can see any/all servers in the two group.

User one creates a server however user two cannot see or interact with the said server.
Now let’s add both users one and two into the group1 group. User two still cannot see said server, because server is still owned/controlled by the one group. User one changes the group owner over from the one group to the group1 group and now both user one and two are able to see and interact with said server because both users are now within the same group as the said server.

What about this:
I have already created 7 servers.
I type the command -> addgroup Minetopia.
After that -> adduser -G Minetopia -s /bin/bash TestUser
After that -> passwd TestUser and then 2 times the password.
I can log in in the panel. How do I give the group/user permissions for the FTP and panel to access, edit and read /var/games/minecraft/servers/Minetopia

To be more specific xd

For the servers that were already created, first add/create the group you wish to have followed by assigning users to that group. Once you’ve done that, login to the webui with the account you created the servers with and change the group owner per-server to the group you created, and once you’ve done that all other users in that group will be able to see and have access to those servers from both the webui and SFTP.

Thanks, but what’s the command for changing the group owner of a server?

Here. Take this. It’s dangerous to go alone:

Then take this:

No commands necessary as the webui already had the functionality to do it for you.

I have used:
adduser USERNAME
passwd USERNAME
usermod -g GROUPNAME USERNAME
usermod -d /var/games/minecraft USERNAME

then i can create servers, but i have a few issues:
they can go up in the FTP
The servers are saved on the user, not on the group
i can’t change the group into the group i created (i think i have to also set a home or something for the group?)
how can i fix those?

(i work on the same server as tjardoftw)

they can go up in the FTP

Yes they can. Linux lets them do that. Linix will, however, stop them accessing (reading / wrinting/ deleting) files outside their group-priviliedges.

The servers are saved on the user, not on the group

This is deafult behaviour. Each user has its own primary group (usually named the same qas the user), all files that user makes is saved by default to the current user and the current users primary group. Changing this is not recomended.

But why do you need this number of users and groups? Please note that MineOS is not really made to be a hosting-server, as it lacks its own user management, pr-user based resource management, customer portal system (including handling payment and non-payments). MineOS is really just an admin-panel for one admin (or a group of admins) to handle one or more minecraft servers. It relies on linux’s user management system, but this only limits access to files and folders.

Short version: If it is a “Rent-a-minecraftserver” portal you are trying to set up: MineOS is not your answer. If it is not; Well,. why do you need to use different users and groups?

We have a total of 4 servers and the bungeecord, but we want to give like the admin of 1 game on our server the FTP and console of that server

I wouldn’t give the admins of separate servers access to MineOS, since you cannot limit their access to resources such as memory and prossecor usage. MineOS only allows for limiting each servers memory usage, but it do not stop your admins from changing the amount of memory given. So if on or all admins suddenly decides thait their servers needs more memory, you may end up in a stiuation where there are more memory allocated for use than there are memory avalable. This leads to server crashes!

The console access they need is the same as is available ingame though the chat window. .I would not give them access to ssh and the underlyiing OS console through SSH.

For FTP access: I would rather look at setting up a web based file transfers where you can direct each user to the correct server directory. The only folder they really need ftp-access to is the plugin/mod-folders of the server, since I guess the only thing they need to change is available plugs or mods.

User access and whitelists for each server can be managed ingame.

The only thing they then cannot do that a server admin probaly could need, is updating the server jar and starting the server if it is stopped. You could probably also make a web script to do this, but I would say that thos would be a task for one or a very few super-admins that has full access to all servers. This means you also keep controll over what server jar they try to run, since the wrong jars may give you problems…

You want to use supplementary groups, not the primary group.

-g, --gid GROUP
The group name or number of the user’s new initial login group. The group must exist.

vs.

-G, --groups GROUP1[,GROUP2,…[,GROUPN]]]
A list of supplementary groups which the user is also a member of. Each group is separated from the next by a comma, with no intervening whitespace. The groups are subject to the same restrictions as the group given with the -g option.
If the user is currently a member of a group which is not listed, the user will be removed from the group. This behaviour can be changed via the -a option, which appends the user to the current supplementary group list.