Skip to content

Script Permission issues #109

@MarkBarbieri

Description

@MarkBarbieri

I'm using Debian Bullseye

Today I ran the latest installer script over the top of an existing install from a few months ago https://raw.githubusercontent.com/TheRemote/MinecraftBedrockServer/master/SetupMinecraft.sh

Following this action, the service no longer starts (I'm using systemd, but this is not the issue)

Several issues on this line: https://github.com/TheRemote/MinecraftBedrockServer/blob/master/start.sh#L58

  • The installation results in a double '/' at the start of the script path
  • To match the sudoers.d drop-in, the calling shell should be /bin/bash
  • It actually needs to be called with sudo (otherwise no point of it being in the sudoers drop-in)

And the sudoers drop-in: https://github.com/TheRemote/MinecraftBedrockServer/blob/master/SetupMinecraft.sh#L224

  • Needs to include the '-a' parameter so it matches the script

So the line in start.sh should be more like:
Permissions=$(sudo /bin/bash dirname/minecraftbe/servername/fixpermissions.sh -a)

and the drop-in
sudoline="$UserName ALL=(ALL) NOPASSWD: /bin/bash $DirName/minecraftbe/$ServerName/fixpermissions.sh -a, /bin/systemctl start $ServerName, /bin/bash $DirName/minecraftbe/$ServerName/start.sh"

Thanks

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions