Hi,
With Debian lenny I am desperately trying to get LXC working (Debian kernel 3.16 and LXC 1).
One big issue is the use of device nodes.
I use lxc.autodev and lxc.cgroup.devices.allow and my config looks like:
lxc.network.type = veth
lxc.network.link = br-lan
lxc.rootfs = /var/lib/vz/private/210
# Common configuration
lxc.include = /usr/share/lxc/config/debian.common.conf
# Container specific configuration
lxc.mount = /var/lib/lxc/core/fstab
lxc.utsname = core
lxc.autodev = 1
lxc.kmsg = 0
# /dev/urandom
lxc.cgroup.devices.allow = c 1:9 rwm
But still, inside the container only root has access to /dev/urandom:
# ls -l /dev/urandom
crw-rw-rw- 1 root root 1, 9 Okt 4 13:06 /dev/urandom
# stat /dev/urandom
Datei: /dev/urandom
Größe: 0 Blöcke: 0 EA Block: 4096 zeichenorientierte Spezialdatei
Gerät: 5h/5d Inode: 28959 Verknüpfungen: 1 Gerätetyp: 1,9
Zugriff: (0666/crw-rw-rw-) Uid: ( 0/ root) Gid: ( 0/ root)
Zugriff : 2017-10-04 13:06:01.251962498 +0000
Modifiziert: 2017-10-04 13:06:01.251962498 +0000
Geändert : 2017-10-04 13:06:01.251962498 +0000
Geburt : -
# su mail -s /bin/bash
$ stat /dev/urandom
stat: der Aufruf von stat für '/dev/urandom' ist nicht möglich: Keine Berechtigung
What the heck is going wrong here?