[SOLVED]LXC with webcam permission denied.

elpigeondindo

New Member
Jul 27, 2023
4
0
1
Hello

I have a problem in my LXC my cam logitech C270 is not accessible.

root@Klipper:~# ls /dev -lsa total 8 0 ---------- 1 root root 0 Aug 24 15:03 ttyACM0 0 ---------- 1 root root 0 Aug 24 15:03 ttyACM1 0 crw-rw---- 1 nobody nogroup 188, 0 Aug 24 14:52 ttyUSB0 0 ---------- 1 root root 0 Aug 24 15:03 ttyUSB1 0 crw-rw-rw- 1 nobody nogroup 1, 9 Aug 24 14:52 urandom 0 crw-rw---- 1 nobody nogroup 81, 0 Aug 24 14:52 video0 0 crw-rw-rw- 1 nobody nogroup 1, 5 Aug 24 14:52 zero


I followed the solution I found here but it didn't work

on the host i do :

root@proxmox:~# lsusb Bus 001 Device 002: ID 8087:8001 Intel Corp. Integrated Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 002: ID 05e3:0626 Genesys Logic, Inc. Hub Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 005: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO) Bus 002 Device 003: ID 10c4:ea60 Silicon Labs CP210x UART Bridge Bus 002 Device 009: ID 046d:0825 Logitech, Inc. Webcam C270 Bus 002 Device 008: ID 1a86:7523 QinHeng Electronics CH340 serial converter Bus 002 Device 007: ID 05e3:0608 Genesys Logic, Inc. Hub Bus 002 Device 006: ID 413c:2107 Dell Computer Corp. KB212-B Quiet Key Keyboard Bus 002 Device 004: ID 046d:c077 Logitech, Inc. Mouse Bus 002 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub root@proxmox:~# chown 100000:100000 /dev/bus/usb/002/009


I changed the config of my lxc like this

arch: amd64 cores: 2 features: nesting=1 hostname: Klipper memory: 512 net0: name=eth0,bridge=vmbr0,hwaddr=AE:B6:62:35:48:BC,ip=dhcp,type=veth onboot: 1 ostype: debian parent: chmod_video0 rootfs: local-lvm:vm-120-disk-0,size=40G swap: 512 unprivileged: 1 lxc.cgroup2.devices.allow: a lxc.cap.drop: lxc.cgroup2.devices.allow: c 188:* rwm lxc.cgroup2.devices.allow: c 189:* rwm lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file lxc.mount.entry: /dev/ttyACM1 dev/ttyACM1 none bind,optional,create=file lxc.mount.entry: /dev/bus/usb/002/009 dev/bus/usb/002/009 none bind,optional,create=file lxc.mount.entry: /dev/video0 dev/video0 none bind,optional,create=file

but on my guest the /dev/video0 still doesn't have the right permission

root@Klipper:~# ls /dev/bus/usb/002/009 -al crw-rw-r-- 1 root root 189, 136 Aug 24 14:52 /dev/bus/usb/002/009 root@Klipper:~# ls /dev/ -al total 8 drwxr-xr-x 8 root root 620 Aug 24 15:03 . drwxr-xr-x 18 root root 4096 Aug 24 15:03 .. drwxr-xr-x 4 root root 80 Aug 24 15:03 .lxc -r--r--r-- 1 root root 37 Aug 24 15:03 .lxc-boot-id drwxr-xr-x 3 root root 60 Aug 24 15:03 bus crw--w---- 1 root tty 136, 0 Aug 24 15:03 console lrwxrwxrwx 1 root root 11 Aug 24 15:03 core -> /proc/kcore lrwxrwxrwx 1 root root 13 Aug 24 15:03 fd -> /proc/self/fd crw-rw-rw- 1 nobody nogroup 1, 7 Aug 24 14:52 full lrwxrwxrwx 1 root root 12 Aug 24 15:03 initctl -> /run/initctl lrwxrwxrwx 1 root root 28 Aug 24 15:03 log -> /run/systemd/journal/dev-log drwxrwxrwt 2 nobody nogroup 40 Aug 24 15:03 mqueue crw-rw-rw- 1 nobody nogroup 1, 3 Aug 24 14:52 null crw-rw-rw- 1 root root 5, 2 Aug 24 15:14 ptmx drwxr-xr-x 2 root root 0 Aug 24 15:03 pts crw-rw-rw- 1 nobody nogroup 1, 8 Aug 24 14:52 random drwxr-xr-x 3 root root 60 Aug 24 15:03 serial drwxrwxrwt 2 root root 40 Aug 24 15:03 shm lrwxrwxrwx 1 root root 15 Aug 24 15:03 stderr -> /proc/self/fd/2 lrwxrwxrwx 1 root root 15 Aug 24 15:03 stdin -> /proc/self/fd/0 lrwxrwxrwx 1 root root 15 Aug 24 15:03 stdout -> /proc/self/fd/1 crw-rw-rw- 1 nobody nogroup 5, 0 Aug 24 14:52 tty crw------- 1 root tty 136, 1 Aug 24 15:14 tty1 crw--w---- 1 root tty 136, 2 Aug 24 15:03 tty2 ---------- 1 root root 0 Aug 24 15:03 ttyACM0 ---------- 1 root root 0 Aug 24 15:03 ttyACM1 crw-rw---- 1 nobody nogroup 188, 0 Aug 24 14:52 ttyUSB0 ---------- 1 root root 0 Aug 24 15:03 ttyUSB1 crw-rw-rw- 1 nobody nogroup 1, 9 Aug 24 14:52 urandom crw-rw---- 1 nobody nogroup 81, 0 Aug 24 14:52 video0 crw-rw-rw- 1 nobody nogroup 1, 5 Aug 24 14:52 zero


Can someone can help me please?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!