Restore archive of FTB server on MineOS Turnkey?

I have a working FTB server running on an old MineOS Turnkey box. I am setting up a new MineOS installation on new hardware and I have archived the FTB server on the old box and copied it to the import folder of the new box. However when I try to restore the archive, I get a red box saying “ignoring command import server, archive contains files with absolute path or …”

Is it possible to restore archives of FTB servers, or are the FTB servers just too complicated?

Edit: Also, when importing an archive will this also create a new profile if it is needed, or do I need to manually set up the FTB profile before I import the archive?

It surprises me that an archive from MineOS wouldn’t be easily imported from a previous version, but the complexity of FTB shouldn’t really factor in in the ability to import the server.

Even though the import function doesn’t work in the new box, simply extract the archive you made to the expected directory /var/games/minecraft/servers, just as it is on your first host. The presence of the directory and its files in the right place will make it automatically show up on the web-ui.

The webui import function does literally just that…extracts the tar/zip to the directory, and nothing more, so it’s easily circumvented.

Regarding profiles, it’ll have to be recreated on the new host. Simply taking the old /var/games/minecraft/profiles directory from your old host will do, if you don’t want to recreate it manually.

I did end up just extracting the archive in the correct place as you suggested and it worked just fine - thanks!

I was having this issue recently and the problem lies with the Hats mod. Specifically one of the files contains … within the filename.

If you edit the file to remove one of the . then you will be able to import the archive.

2 Likes

Hats - arrgh! Thanks for the tip, I’ll have a look.

hexparrot:

I know another time you have stated but I can’t seem to find the post. but what is the reason that the archiving portion of MineOS will archive this but then won’t use the archive with this file included?

I know you said it was something to do with security. but it just seemed odd that if Mine OS was the agent doing the archiving in the first place that there would be a security concern.

Given that there is once you explain it, I will then go make a post to the offending mod author in attempt to get the problem addressed to our archives will be a bit more usefull.

Lee

When the archive is extracted, it extracts all filepaths as root then chowns the file to the appropriate user. If an archive were to have a file called ../../../../etc/fstab, you would then have your server broken simply by the import!

There are two factors at play here. For starters, the MineOS script should be more robust; right now it finds .., but instead it could find ../ which is more indicative of a filepath trying to break out of the appropriate directory. This would actually be a complete solution; however, I don’t do much changes to Python MineOS nowadays, so I’m often reluctant to change much at all, with how I don’t have a testing base, just people who use it for production. I guess I can just look into making that mod here, but I never seem to get around to it…

The second factor is no files really need to have .. in their filename. However, it’s not inherently dangerous, just bad style–after all, what file at all should have two dots?

At any rate, I’d say that .. should be solved at the mod level for its sake, but it’s a secondary concern; the real issue is the Python code, which now we see has a good, viable reason to go and modify.

I tracked down the hats file with the double dots “…”.

It’s “© E.V.A…tcn” and the path is “hats\Contributors”.

Once I changed the double dot to a single, restoring the archive worked!

so as long as the file in question doesn’t start with … it’s not a security concern as I understand it?
Or Am I not understanding it? because if that’s the case this file is ok. if I’m out to lunch That’s ok too, but I just want to understand the situation.

Hexparrot:
Below is a post i’m formulating to the author of the Hats mod that is the offender in this case. please proofread for accuracy to ensure I am giving that author the correct information needed.

Lee

Security concern: Due to the file © E.V.A…tcn within this mod. when a server with mod install is archived. The archive throws errors when you try to use it because of the … in the file name since that could lead to an elevation of privilege.

Would it be possible to rename © E.V.A…tcn to alleviate the issue in an upcoming patch so that our archives would be of more use?

I’m not saying that your mod is gaining or attempting to gain elevation. just that the … is a method of doing so within an archive.

I am using a 1.6.4 version of FTB which is relatively old now. I don’t know if the latest Hats mod has already fixed this issue and therefore is no longer a problem any more?

I’m using a 1.7.10 FTB pack that has hats and it’s not fixed. the version number is: 4.0.1

Try updating to the latest commit in git; I’ve made the small change that I hope will allow your archives to work without any bad effects.