docker-minecraft-server icon indicating copy to clipboard operation
docker-minecraft-server copied to clipboard

mc-send-to-console ==> bash: /tmp/minecraft-console-in: Permission denied (possibly rootless Podman specific)

Open vorburger opened this issue 3 years ago • 6 comments

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

vorburger avatar Apr 25 '22 17:04 vorburger

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.

itzg avatar Apr 25 '22 21:04 itzg

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.

github-actions[bot] avatar May 26 '22 02:05 github-actions[bot]

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.

github-actions[bot] avatar Jun 26 '22 02:06 github-actions[bot]

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.

github-actions[bot] avatar Aug 01 '22 02:08 github-actions[bot]

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.

itzg avatar Aug 23 '22 01:08 itzg

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.

github-actions[bot] avatar Sep 22 '22 02:09 github-actions[bot]