docker-minecraft-server
docker-minecraft-server copied to clipboard
mc-send-to-console ==> bash: /tmp/minecraft-console-in: Permission denied (possibly rootless Podman specific)
Describe the problem
When running ./test of https://github.com/OASIS-learn-study/minecraft-storeys-maker (at e21fdcd), then:
host$ podman exec storeys mc-send-to-console help
bash: /tmp/minecraft-console-in: Permission denied
host$ podman exec -it storeys bash
root@a6849f7127ef:/data# ls -alsh /tmp/minecraft-console-in
0 prw-rw-r--. 1 root root 0 Apr 25 17:34 /tmp/minecraft-console-in
root@a6849f7127ef:/data# mc-send-to-console help
bash: /tmp/minecraft-console-in: Permission denied
root@a6849f7127ef:/data# id
uid=0(root) gid=0(root) groups=0(root)
This may be somehow related to using podman instead of docker, and -e UID=0 -e GID=0 (here for this).
I've found #1208 and #1216, but somehow that doesn't do the trick here.
I can probably work around it by using rcon-cli instead of mc-send-to-console so shouldn't be blocking me, but just wanted to at least record it here anyway.
Container definition
No response
Container logs
No response
Thanks for all the details. I don't think it's a podman thing, but rather the -e UID=0. The conditional here
https://github.com/itzg/docker-minecraft-server/blob/bca7b79f779c67c87a0443d8d925e96658b901c0/bin/mc-send-to-console#L15
needs to make use of that rather than assuming a "sudo" to the minecraft user.
This issue is stale because it has been open 30 days with no activity. Please add a comment describing the reason to keep this issue open.
This issue is stale because it has been open 30 days with no activity. Please add a comment describing the reason to keep this issue open.
This issue is stale because it has been open 30 days with no activity. Please add a comment describing the reason to keep this issue open.
I finally circled around to this issue and I'm wondering if this identifies the cause
https://unix.stackexchange.com/a/503169
One version of the solution may be to set CONSOLE_IN_NAMED_PIPE so that the pipe is not in /tmp. Perhaps a filename within /data would work.
This issue is stale because it has been open 30 days with no activity. Please add a comment describing the reason to keep this issue open.