-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong owner in /dev/pts #1016
Comments
This also prevents the use of
For my system:
|
This also prevents the mutter kvm test suit from running:
|
I filed containers/crun#1158 for some clarifications and advice. |
Anything that's specified during 'podman create ...' gets statically baked into the container's configuration, and is either difficult or impossible to change afterwards. This means that Toolbx containers created with older versions of Toolbx keep diverging from those created with newer versions. Hence, making it complicated to keep older containers working with newer Toolbx. Mounting the devpts file system at runtime as part of the Toolbx container's entry point will make it possible to update the attributes of the mount, if necessary, for both existing and newly created containers. For what it's worth, this does alter the mount options by removing 'context'. With 'podman create --mount type=devpts,destination=/dev/pts' it was: $ mount | grep ... devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime, context="system_u:object_r:container_file_t:s0:c1022,c1023", gid=100005,mode=620,ptmxmode=666) Now with 'mount -t devpts -o noexec,nosuid,gid=5,mode=620,ptmxmode=666' it is: $ mount | grep devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel, gid=100005,mode=620,ptmxmode=666) containers#1016
Anything that's specified during 'podman create ...' gets statically baked into the container's configuration, and is either difficult or impossible to change afterwards. This means that Toolbx containers created with older versions of Toolbx keep diverging from those created with newer versions. Hence, making it complicated to keep older containers working with newer Toolbx. Mounting the devpts file system at runtime as part of the Toolbx container's entry point will make it possible to update the attributes of the mount, if necessary, for both existing and newly created containers. For what it's worth, this does alter the mount options by removing 'context'. With 'podman create --mount type=devpts,destination=/dev/pts' it was: $ mount | grep ... devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime, context="system_u:object_r:container_file_t:s0:c1022,c1023", gid=100005,mode=620,ptmxmode=666) Now with 'mount -t devpts -o noexec,nosuid,gid=5,mode=620,ptmxmode=666' it is: $ mount | grep devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel, gid=100005,mode=620,ptmxmode=666) containers#1016
Anything that's specified during 'podman create ...' gets statically baked into the container's configuration, and is either difficult or impossible to change afterwards. This means that Toolbx containers created with older versions of Toolbx keep diverging from those created with newer versions. Hence, making it complicated to keep older containers working with newer Toolbx. Mounting the devpts file system at runtime as part of the Toolbx container's entry point will make it possible to update the attributes of the mount, if necessary, for both existing and newly created containers. For what it's worth, this does alter the mount options by removing 'context'. With 'podman create --mount type=devpts,destination=/dev/pts' it was: $ mount | grep ... devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime, context="system_u:object_r:container_file_t:s0:c1022,c1023", gid=100005,mode=620,ptmxmode=666) Now with 'mount -t devpts -o noexec,nosuid,gid=5,mode=620,ptmxmode=666' it is: $ mount | grep devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel, gid=100005,mode=620,ptmxmode=666) containers#1016
That got renamed to containers/crun#1158 |
The original problem reported with Python does appear to be solved by PR containers/crun#1159 that's linked from the above podman/crun issue:
|
I suspect that this is similar to the problem @dustymabe has been facing with Even if you fix the user ownership of the pseudo-terminal device (ie., the output of I use Emacs, but not in a server-client mode, so I am not entirely sure, but I think that the client should open in the same terminal where I typed It's an accident because the pseudo-terminal devices inside the container aren't the same as on the host. They are totally different because the container has it's own |
Does containers/crun#1159 help? I can try to run the mutter test suite myself, but it will take some time. :) |
Always fun to test stuff like this on silverblue. Yes, works like a charm. Thanks! |
Yes, I can imagine. I locally rebuild the RPM with the relevant patch and force it onto my base image. :P Thanks for testing it, @swick ! |
I am closing this on the assumption that the Please leave a comment or open an issue if you have reason to believe otherwise. |
Describe the bug
My /dev/pts/ inside a toolbox have the owner set as root. Outside of toolbox they are owned by my user.
Steps how to reproduce the behaviour
Expected behaviour
No error.
Actual behaviour
"PermissionError: [Errno 13] Permission denied: '/dev/pts/x'.
Output of
toolbox --version
(v0.0.90+)toolbox version 0.0.99.3
Toolbox package info (
Github
)tag 0.0.99.3
Output of
podman version
e.g.,
The text was updated successfully, but these errors were encountered: