SOLVED Can't figure out app permissions

bassmannate

Dabbler
Joined
Nov 24, 2022
Messages
15
I'm about to pull my hair out over app permissions.

I've created a minetest server and changed the PVC storage to a host path so I can get in and edit configuration files easier. When I make any changes to permissions like adding a user to ACL, it seems to break everything. It can still read but it can't seem to write because I get the following in the logs:
Code:
2023-01-22T14:49:33.353377768Z 2023-01-22 08:49:33: ERROR[Main]: ServerError: Failed to initialize world: Failed to update the config file
2023-01-22T14:49:33.853503353Z 2023-01-22 08:49:33: ERROR[Main]: Error writing configuration file: "world/world.mt"
2023-01-22T14:49:33.853545168Z 2023-01-22 08:49:33: ACTION[Main]: Server: Shutting down


My runAsUser and runAsGroup are both set to 0 since it can't seem to even start unless it has root permission. fsGroup is set to a user I specifically created for minetest.

I've tried changing the permissions to all sorts of things. I've had minetest as the owner and group, apps as the owner with minetest as the group and the other way around. I've even opened up the permissions for rwx for all and it still can't seem to write.

I've also just tried adding users to the ACL to see what happens and I still get the errors. I can still access and edit files through sftp using any user that has access.

What am I doing wrong?
 

bassmannate

Dabbler
Joined
Nov 24, 2022
Messages
15
Ok, so I figured out what's going on. My dataset has the permissions I give. However, the data within gets what ever permissions the container is giving. In this case, owner 568, group 3003 (read only) and others (read only). If I change the permissions from the dataset level recursively, it breaks everything because the uids in the container are different.

Not sure how I can work around this at the moment. I know I can shell into the container but then I'm stuck with only being able to use vi to edit config files which, while I can stumble through it, I wouldn't call myself adept at using.

Nevermind. I'm a dumb-dumb. chmod to the rescue. Didn't think about it that it would work if I did it from within the container.

Just another update. This may not have been caused by permissions at all. The default configs for minetest imply that your path to your world folder should be relative but it turns out it needs to be absolute. It was trying to access a folder that didn't exist. I haven't tried changing my permissions for the folder using the truenas interface yet but I suspect everything will still work and I'll be able to edit files using my desktop text editor.
 
Last edited:
Top