MineOS Fails to Auto Restart or Backup - Permission Issues (Debian 9)


#1

I recently had to wipe my machine due to an unrelated issue to minecraft/mineos and in the process I had to reinstall MineOS, while I am not the best with linux, I get around okay. I installed it fine, transferred my files back (p2p from another machine). I created a new account for server management called ‘minecraft’, I defaulted all the permissions in /usr/games/minecraft/ and /var/games/minecraft/ to minecraft:minecraft and launched the servers as normal.

My issue that I am running into now is that no matter what I try or do the servers refuse to auto restart on their corresponding cronjobs and do not create backups either. I’m suspecting that I haven’t manually set a permission somewhere and I am looking for suggestions, what do you think could be causing this? Thanks.


#2

It is worth noting that both the Restart and Backup functions can happen through manual use (on MineOS and in PuTTY using rdiff-backup for backups). I’m at a loss as to why it won’t do it automatically.


#3

Does /var/log/mineos.log show any information on the attempts?

Have you tried any other users if they can successfully auto-start / cronjobs work?

I’m thinking maybe it has to do with the creation of the minecraft user–anything special you left out/added in terms of create args?


#4

I feel very dumb to admit it, but it was a user error on my part. I took a backup of all of the /var/games/minecraft when I reinstalled my OS but neglected to think anything was outside of it with user settings… But as you know, cronjobs are not stored in /var/games/minecraft! All I had to do is reset them up in MineOS and it should now work. Thanks for your dedication to this project, Hexparrot. You’re awesome <3


#5

Still having issues with this, when the server restarted at the set time tonight it kicked the server(s) offline and refused to reboot up. What in the world should my /var/games/minecraft permissions be? I am having many issues when I set it to minecraft:minecraft, root:minecraft and minecraft:root. Whenever I’ve switched the folder permissions I’ve done chmod g+s -R /var/games/minecraft


#6

By default, I believe /var/games/minecraft is owned by root and writable by root though readable by all other users; /var/games/minecraft/servers/<server> however is owned by a user typically, along with that user’s group which is usually named after the user, or a custom group to allow multiple other users to interact with the same servers.

You may choose to export your servers to archives and copy/transfer them out somewhere safe temporarily followed by deleting /var/games/minecraft as root and restarting either the web ui service or the system to have those regenerated. Afterwards copy/transfer back the archives into /var/games/minecraft/import and import them from the web ui, and once done permissions should match what they were last for the server files.

You may also choose to export your servers to archives and copy/transfer them out somewhere safe temporarily followed by deleting /var/games/minecraft as root and restarting either the web ui service or the system to have those regenerated. Afterwards, you’ll want to extract the .tar.gz archive’s files to a folder (separate folders per server) followed by recompressing those extracted files into .zip files, then putting those new .zip archive files into /var/games/minecraft/import and importing them back again via the web ui. This method clears all permissions and has them basically default back to their defaults, reducing the chances of any further permission errors.


#7

chmod g+s? Isn’t this the setuid bit, which means that things run as if they have root permissions? If so, this could be terribly problematic all-around–anything with +s would then be created/owned as root even if mc invoked it (and would be run as mc since it’s java that would not be +s.

Not sure how the g factors into it, but I’m gonna guess that’s complicating things being there in general.

chown -R root:root /var/games/minecraft
chown -R minecraft:minecraft /var/games/minecraft/import
chown -R minecraft:minecraft /var/games/minecraft/servers/*
chown -R minecraft:minecraft /var/games/minecraft/archive/*
chown -R minecraft:minecraft /var/games/minecraft/backup/*

Also, and this is just guessing:

chmod -R -s /var/games/minecraft