简体   繁体   English

lxc-Linux容器无法访问设备节点

[英]lxc - Linux container can not access device node

I used the following configuration to bind the lirc0 into the container. 我使用以下配置将lirc0绑定到容器中。

lxc.mount.entry = /dev/lirc0 dev/lirc0 none bind,optional,create=file

The attribute of the /dev/lirc0 in the host as follows. 主机中/ dev / lirc0的属性如下。

crw-------    1 root root  251,   0 Jul 16 20:00 /dev/lirc0

and I use the lxc-attach to go into the container. 我使用lxc-attach进入容器。 The attribute of the /dev/lirc0 in the container is the same as the host 容器中/dev/lirc0的属性与主机相同

crw-------    1 root root  251,   0 Jul 16 20:00 /dev/lirc0

But the /dev/lirc0 can't be open. 但是/dev/lirc0无法打开。 The error is the "Operation not permitted" and I'm the supervisor(root) in the container. 错误是“不允许的操作”,我是容器中的主管(根)。

How can I get the privilege to access /dev/lirc0 in the container? 如何获得在容器中访问/dev/lirc0的特权?

您需要在正在运行的二进制文件上设置Linux功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM