Replies: 4 comments 5 replies
-
|
Are you ssh into the container? Only the primary process (pid 1) of the container is guaranteed access to the leaked group sockets. |
Beta Was this translation helpful? Give feedback.
-
|
I encounter the same problem too. We have a NFS mounted NAS that require the user to have specific group to read some data. I'm used to use the container via terminal or dev-container which is totally fine. But some user have IDE that can only with with ssh. And I was unable to make ssh process to have the group that Podman map. |
Beta Was this translation helpful? Give feedback.
-
|
I wonder if this is related: Note keep-groups can only work if the container itself does not call setgroups() quote from Searching for setgroups in openssh code base: https://github.com/search?q=repo%3Aopenssh%2Fopenssh-portable%20setgroups&type=code result: setgroups is used in the openssh code base |
Beta Was this translation helpful? Give feedback.
-
|
如果需要sshd服务并且需要用户附加组信息, 可以使用dropbear替代openssh. 取消其中的initgroups调用即可, 这当然有其他安全问题, 如果以rootless方式运行的容器中只有一个root用户也可以接受. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I try to access a host device inside a container while being connected through ssh.
I use
--userns keep-id --group-add keep-groups --device /dev/ttyS0when running the container.Inside the container, I can call
cat /ttyS0without a problem.idshows:If I connect me through ssh, I get
Permission deniedwtihcat /ttyS0.idshows:How do I get the correct group rights when using ssh?
My minimal example:
https://gist.github.com/Viatorus/278266a421443e46bfa53f045a6bd474
Beta Was this translation helpful? Give feedback.
All reactions