-
-
Notifications
You must be signed in to change notification settings - Fork 501
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
DietPi-Software | MineOS: Run everything as unprivileged user #4551
Comments
As long as MineOS makes us of UNIX user authentication, instead of an own/internal user management, running it as non-root user is not possible. It can start, when generating SSL certs within its own dir with proper permission, but as fast as one tries to login: Nov 08 22:24:25 VM-Bookworm MineOS[4450]: Uncaught Exception: Error: EACCES: permission denied, open '/etc/shadow'
Nov 08 22:24:25 VM-Bookworm MineOS[4450]: Error: EACCES: permission denied, open '/etc/shadow'
Nov 08 22:24:25 VM-Bookworm MineOS[4450]: About to exit with code 1
Nov 08 22:24:25 VM-Bookworm systemd[1]: mineos.service: Main process exited, code=exited, status=1/FAILURE
Nov 08 22:24:25 VM-Bookworm systemd[1]: mineos.service: Failed with result 'exit-code'.
Nov 08 22:24:25 VM-Bookworm systemd[1]: mineos.service: Consumed 2.468s CPU time.
|
Ahh, there is one way via |
PR up to create again a non-root login user. Seems to work all well: #7276 |
Currently, as intended by the MineOS developers, the web interface runs as root user. One can login as any UNIX user to install and run individual Minecraft servers.
A more consequent approach that fits more to the DietPi-like single person setup, would be to run the web interface as
mineos
user and limit web UI logins to this service user as well. The question is whether this is even possible with the UNIX user authentication mechanism used.In the past we had a
mineos
user only for web UI logins. But it has limited permissions as of file ownership, henceroot
user still needs to be used for many tasks, and when using it once to install a Minecraft server,mineos
cannot control it anymore. For a single person system this is a little inconvenient and for larger multi-purpose systems it is still an issue that the parent/UI service still runs as roots and allows any unprivileged UNIX user to login, create and run Minecraft servers, and that for administration tasks, the UNIXroot
user strictly requires a login password, while for system admin tasks SSH key authentication and sudo are common ways to avoid this.Topic came up here: MichaIng/DietPi-Docs#529 (comment)
The text was updated successfully, but these errors were encountered: