toolbox
toolbox copied to clipboard
/dev/stderr can't be used by the regular user inside the toolbox
Describe the bug
/dev/stderr can't be used by the regular user inside the toolbox, although it works for the superuser. Outside of toolbox, regular users are allowed to write to /dev/stderr. This seems to be connected to procfs.
Steps how to reproduce the behaviour
$ toolbox create test
Created container: test
Enter with: toolbox enter test
$ # using image registry.fedoraproject.org/fedora-toolbox:37
$ toolbox enter test
$ echo foo > /dev/stderr
bash: /dev/stderr: Permission denied
$ sudo bash -c 'echo foo > /dev/stderr'
foo
Expected behaviour
$ echo foo > /dev/stderr succeeds for regular users inside the toolbox
Actual behaviour
$ echo foo > /dev/stderr
bash: /dev/stderr: Permission denied
but succeeds for root
$ sudo bash -c 'echo foo > /dev/stderr'
foo
Output of toolbox --version (v0.0.90+)
$ toolbox --version
toolbox version 0.0.99.4
Toolbox package info (rpm -q toolbox)
$ rpm -q toolbox
toolbox-0.0.99.4-1.fc37.x86_64
Output of podman version
$ podman version
Client: Podman Engine
Version: 4.4.2
API Version: 4.4.2
Go Version: go1.19.6
Built: Wed Mar 1 12:22:59 2023
OS/Arch: linux/amd64
Podman package info (rpm -q podman)
$ rpm -q podman
podman-4.4.2-2.fc37.x86_64
Info about your OS Fedora Silverblue 37
Additional context