[Bug 1549361] Re: /dev/kvm has wrong permissions
Christian Felsing
hostmaster at ip6.li
Wed Feb 24 16:48:27 UTC 2016
Further investigation suspects a problem with udev and systemd:
# udevadm test $(udevadm info -q path -n kvm)
calling: test
version 204
This program is for debugging only, it does not run any program
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.
=== trie on-disk ===
tool version: 204
file size: 5759486 bytes
header size 80 bytes
strings 1267110 bytes
nodes 4492296 bytes
load module index
read rules file: /lib/udev/rules.d/40-bridge-network-interface.rules
read rules file: /lib/udev/rules.d/40-crda.rules
read rules file: /lib/udev/rules.d/40-gnupg.rules
read rules file: /lib/udev/rules.d/40-hyperv-hotadd.rules
read rules file: /lib/udev/rules.d/40-libgphoto2-6.rules
GOTO 'libgphoto2_usb_end' has no matching label in: '/lib/udev/rules.d/40-libgphoto2-6.rules'
read rules file: /lib/udev/rules.d/40-libsane.rules
read rules file: /lib/udev/rules.d/40-qemu-system-common.rules
read rules file: /lib/udev/rules.d/40-vlan-network-interface.rules
read rules file: /lib/udev/rules.d/42-usb-hid-pm.rules
read rules file: /lib/udev/rules.d/50-firmware.rules
read rules file: /lib/udev/rules.d/50-rbd.rules
read rules file: /lib/udev/rules.d/50-udev-default.rules
read rules file: /lib/udev/rules.d/55-dm.rules
read rules file: /lib/udev/rules.d/56-lvm.rules
read rules file: /lib/udev/rules.d/60-cdrom_id.rules
read rules file: /lib/udev/rules.d/60-keyboard.rules
read rules file: /lib/udev/rules.d/60-persistent-alsa.rules
read rules file: /lib/udev/rules.d/60-persistent-input.rules
read rules file: /lib/udev/rules.d/60-persistent-serial.rules
read rules file: /lib/udev/rules.d/60-persistent-storage-dm.rules
read rules file: /lib/udev/rules.d/60-persistent-storage-tape.rules
read rules file: /lib/udev/rules.d/60-persistent-storage.rules
read rules file: /lib/udev/rules.d/60-persistent-v4l.rules
read rules file: /lib/udev/rules.d/61-accelerometer.rules
read rules file: /lib/udev/rules.d/62-google-cloudimg.rules
read rules file: /lib/udev/rules.d/64-btrfs.rules
read rules file: /lib/udev/rules.d/69-cd-sensors.rules
IMPORT found builtin 'usb_id --export %p', replacing /lib/udev/rules.d/69-cd-sensors.rules:89
read rules file: /etc/udev/rules.d/70-persistent-net.rules
read rules file: /lib/udev/rules.d/70-power-switch.rules
read rules file: /etc/udev/rules.d/70-smartcard-hsm.rules
read rules file: /lib/udev/rules.d/70-uaccess.rules
read rules file: /lib/udev/rules.d/71-biosdevname.rules
read rules file: /lib/udev/rules.d/71-seat.rules
read rules file: /lib/udev/rules.d/73-idrac.rules
read rules file: /lib/udev/rules.d/73-seat-late.rules
read rules file: /lib/udev/rules.d/75-net-description.rules
read rules file: /lib/udev/rules.d/75-persistent-net-generator.rules
read rules file: /lib/udev/rules.d/75-probe_mtd.rules
read rules file: /lib/udev/rules.d/75-tty-description.rules
read rules file: /lib/udev/rules.d/78-graphics-card.rules
read rules file: /lib/udev/rules.d/78-sound-card.rules
read rules file: /lib/udev/rules.d/80-drivers.rules
read rules file: /lib/udev/rules.d/80-udisks2.rules
read rules file: /lib/udev/rules.d/85-hdparm.rules
read rules file: /lib/udev/rules.d/85-keyboard-configuration.rules
read rules file: /lib/udev/rules.d/85-lvm2.rules
read rules file: /lib/udev/rules.d/85-regulatory.rules
read rules file: /lib/udev/rules.d/95-cd-devices.rules
read rules file: /lib/udev/rules.d/95-udev-late.rules
rules contain 98304 bytes tokens (8192 * 12 bytes), 17986 bytes strings
6230 strings (56539 bytes), 4793 de-duplicated (39991 bytes), 1438 trie nodes used
IMPORT builtin 'usb_id' /lib/udev/rules.d/40-libgphoto2-6.rules:3
unable to access usb_interface device of '/sys/devices/virtual/misc/kvm'
IMPORT builtin 'usb_id' returned non-zero
GROUP 106 /lib/udev/rules.d/40-qemu-system-common.rules:1
MODE 0660 /lib/udev/rules.d/40-qemu-system-common.rules:1
OWNER 0 /etc/udev/rules.d/70-smartcard-hsm.rules:2
GROUP 0 /etc/udev/rules.d/70-smartcard-hsm.rules:2
MODE 0660 /etc/udev/rules.d/70-smartcard-hsm.rules:2
IMPORT builtin 'path_id' /lib/udev/rules.d/71-seat.rules:43
IMPORT builtin 'path_id' returned non-zero
RUN 'uaccess' /lib/udev/rules.d/73-seat-late.rules:15
handling device node '/dev/kvm', devnum=c10:232, mode=0660, uid=0, gid=0
preserve permissions /dev/kvm, 020660, uid=0, gid=0
preserve already existing symlink '/dev/char/10:232' to '../kvm'
ACTION=add
DEVNAME=/dev/kvm
DEVPATH=/devices/virtual/misc/kvm
MAJOR=10
MINOR=232
SUBSYSTEM=misc
TAGS=:seat:uaccess:
USEC_INITIALIZED=73725
run: 'uaccess'
unload module index
but
# cat /lib/udev/rules.d/40-qemu-system-common.rules
KERNEL=="kvm", GROUP="kvm", MODE="0660"
so /dev/kvm should have group "kvm" instead of root.
Every device is owned by root:root:
# l /dev/
insgesamt 12
drwxr-xr-x 16 root root 4360 Feb 24 17:00 .
drwxr-xr-x 22 root root 4096 Feb 23 05:04 ..
crw------- 1 root root 10, 235 Feb 24 17:32 autofs
-rw-r--r-- 1 root root 1105 Feb 24 17:00 .blkid.tab
-rw-r--r-- 1 root root 1109 Feb 24 17:00 .blkid.tab.old
drwxr-xr-x 2 root root 780 Feb 24 16:59 block
drwxr-xr-x 2 root root 60 Feb 24 16:59 bsg
crw------- 1 root root 10, 234 Feb 24 17:32 btrfs-control
drwxr-xr-x 3 root root 60 Feb 24 16:59 bus
drwxr-xr-x 2 root root 3360 Feb 24 17:00 char
crw-rw---- 1 root root 5, 1 Feb 24 17:35 console
lrwxrwxrwx 1 root root 11 Feb 24 16:59 core -> /proc/kcore
drwxr-xr-x 2 root root 60 Feb 24 16:59 cpu
crw-rw---- 1 root root 10, 60 Feb 24 17:35 cpu_dma_latency
crw------- 1 root root 10, 203 Feb 24 17:32 cuse
drwxr-xr-x 6 root root 120 Feb 24 16:59 disk
brw-rw---- 1 root root 252, 0 Feb 24 17:35 dm-0
brw-rw---- 1 root root 252, 1 Feb 24 17:35 dm-1
brw-rw---- 1 root root 252, 2 Feb 24 17:35 dm-2
brw-rw---- 1 root root 252, 3 Feb 24 17:46 dm-3
brw-rw---- 1 root root 252, 4 Feb 24 17:39 dm-4
brw-rw---- 1 root root 252, 5 Feb 24 17:35 dm-5
brw-rw---- 1 root root 252, 6 Feb 24 17:46 dm-6
brw-rw---- 1 root root 252, 7 Feb 24 17:35 dm-7
brw-rw---- 1 root root 252, 8 Feb 24 17:35 dm-8
crw-rw---- 1 root root 10, 61 Feb 24 17:35 ecryptfs
crw-rw---- 1 root root 29, 0 Feb 24 17:35 fb0
lrwxrwxrwx 1 root root 13 Feb 24 16:59 fd -> /proc/self/fd
crw-rw---- 1 root root 1, 7 Feb 24 17:35 full
crw-rw---- 1 root root 10, 229 Feb 24 17:35 fuse
crw-rw---- 1 root root 249, 0 Feb 24 17:35 hidraw0
crw-rw---- 1 root root 249, 1 Feb 24 17:35 hidraw1
crw-rw---- 1 root root 10, 228 Feb 24 17:35 hpet
lrwxrwxrwx 1 root root 14 Feb 24 16:59 .initramfs -> /run/initramfs
drwxr-xr-x 4 root root 220 Feb 24 17:00 input
crw-rw---- 1 root root 248, 0 Feb 24 17:35 ipmi0
crw-rw---- 1 root root 1, 11 Feb 24 17:35 kmsg
crw-rw---- 1 root root 10, 232 Feb 24 17:46 kvm
srw-rw-rw- 1 root root 0 Feb 24 17:00 log
brw-rw---- 1 root root 7, 0 Feb 24 17:35 loop0
brw-rw---- 1 root root 7, 1 Feb 24 17:35 loop1
brw-rw---- 1 root root 7, 2 Feb 24 17:35 loop2
brw-rw---- 1 root root 7, 3 Feb 24 17:35 loop3
brw-rw---- 1 root root 7, 4 Feb 24 17:35 loop4
brw-rw---- 1 root root 7, 5 Feb 24 17:35 loop5
brw-rw---- 1 root root 7, 6 Feb 24 17:35 loop6
brw-rw---- 1 root root 7, 7 Feb 24 17:35 loop7
crw-rw---- 1 root root 10, 237 Feb 24 17:35 loop-control
drwxr-xr-x 2 root root 240 Feb 24 16:59 mapper
crw-rw---- 1 root root 10, 227 Feb 24 17:35 mcelog
crw-rw---- 1 root root 1, 1 Feb 24 17:35 mem
crw-rw---- 1 root root 10, 57 Feb 24 17:35 memory_bandwidth
drwxr-xr-x 2 root root 60 Feb 24 16:59 net
crw-rw---- 1 root root 10, 59 Feb 24 17:35 network_latency
crw-rw---- 1 root root 10, 58 Feb 24 17:35 network_throughput
crw-rw---- 1 root root 1, 3 Feb 24 17:35 null
crw-rw---- 1 root root 1, 4 Feb 24 17:35 port
crw-rw---- 1 root root 108, 0 Feb 24 17:35 ppp
crw-rw---- 1 root root 10, 1 Feb 24 17:35 psaux
crw-rw---- 1 root root 5, 2 Feb 24 17:46 ptmx
crw-rw---- 1 root root 250, 0 Feb 24 17:35 ptp0
crw-rw---- 1 root root 250, 1 Feb 24 17:35 ptp1
drwxr-xr-x 2 root root 0 Feb 24 16:59 pts
brw-rw---- 1 root root 1, 0 Feb 24 17:35 ram0
brw-rw---- 1 root root 1, 1 Feb 24 17:35 ram1
brw-rw---- 1 root root 1, 10 Feb 24 17:35 ram10
brw-rw---- 1 root root 1, 11 Feb 24 17:35 ram11
brw-rw---- 1 root root 1, 12 Feb 24 17:35 ram12
brw-rw---- 1 root root 1, 13 Feb 24 17:35 ram13
brw-rw---- 1 root root 1, 14 Feb 24 17:35 ram14
brw-rw---- 1 root root 1, 15 Feb 24 17:35 ram15
brw-rw---- 1 root root 1, 2 Feb 24 17:35 ram2
brw-rw---- 1 root root 1, 3 Feb 24 17:35 ram3
brw-rw---- 1 root root 1, 4 Feb 24 17:35 ram4
brw-rw---- 1 root root 1, 5 Feb 24 17:35 ram5
brw-rw---- 1 root root 1, 6 Feb 24 17:35 ram6
brw-rw---- 1 root root 1, 7 Feb 24 17:35 ram7
brw-rw---- 1 root root 1, 8 Feb 24 17:35 ram8
brw-rw---- 1 root root 1, 9 Feb 24 17:35 ram9
crw-rw---- 1 root root 1, 8 Feb 24 17:35 random
crw-rw---- 1 root root 10, 62 Feb 24 17:35 rfkill
lrwxrwxrwx 1 root root 4 Feb 24 17:35 rtc -> rtc0
crw-rw---- 1 root root 254, 0 Feb 24 17:35 rtc0
brw-rw---- 1 root root 8, 0 Feb 24 17:35 sda
brw-rw---- 1 root root 8, 1 Feb 24 17:35 sda1
brw-rw---- 1 root root 8, 2 Feb 24 17:35 sda2
brw-rw---- 1 root root 8, 3 Feb 24 17:35 sda3
crw-rw---- 1 root root 21, 0 Feb 24 17:35 sg0
lrwxrwxrwx 1 root root 8 Feb 24 17:00 shm -> /run/shm
crw-rw---- 1 root root 10, 231 Feb 24 17:35 snapshot
drwxr-xr-x 2 root root 80 Feb 24 17:00 snd
lrwxrwxrwx 1 root root 15 Feb 24 16:59 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root 15 Feb 24 16:59 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root 15 Feb 24 16:59 stdout -> /proc/self/fd/1
crw-rw---- 1 root root 5, 0 Feb 24 17:35 tty
crw-rw---- 1 root root 4, 0 Feb 24 17:35 tty0
crw-rw---- 1 root root 4, 1 Feb 24 17:35 tty1
crw-rw---- 1 root root 4, 10 Feb 24 17:35 tty10
crw-rw---- 1 root root 4, 11 Feb 24 17:35 tty11
crw-rw---- 1 root root 4, 12 Feb 24 17:35 tty12
crw-rw---- 1 root root 4, 13 Feb 24 17:35 tty13
crw-rw---- 1 root root 4, 14 Feb 24 17:35 tty14
crw-rw---- 1 root root 4, 15 Feb 24 17:35 tty15
crw-rw---- 1 root root 4, 16 Feb 24 17:35 tty16
crw-rw---- 1 root root 4, 17 Feb 24 17:35 tty17
crw-rw---- 1 root root 4, 18 Feb 24 17:35 tty18
crw-rw---- 1 root root 4, 19 Feb 24 17:35 tty19
crw-rw---- 1 root root 4, 2 Feb 24 17:35 tty2
crw-rw---- 1 root root 4, 20 Feb 24 17:35 tty20
crw-rw---- 1 root root 4, 21 Feb 24 17:35 tty21
crw-rw---- 1 root root 4, 22 Feb 24 17:35 tty22
crw-rw---- 1 root root 4, 23 Feb 24 17:35 tty23
crw-rw---- 1 root root 4, 24 Feb 24 17:35 tty24
crw-rw---- 1 root root 4, 25 Feb 24 17:35 tty25
crw-rw---- 1 root root 4, 26 Feb 24 17:35 tty26
crw-rw---- 1 root root 4, 27 Feb 24 17:35 tty27
crw-rw---- 1 root root 4, 28 Feb 24 17:35 tty28
crw-rw---- 1 root root 4, 29 Feb 24 17:35 tty29
crw-rw---- 1 root root 4, 3 Feb 24 17:35 tty3
crw-rw---- 1 root root 4, 30 Feb 24 17:35 tty30
crw-rw---- 1 root root 4, 31 Feb 24 17:35 tty31
crw-rw---- 1 root root 4, 32 Feb 24 17:35 tty32
crw-rw---- 1 root root 4, 33 Feb 24 17:35 tty33
crw-rw---- 1 root root 4, 34 Feb 24 17:35 tty34
crw-rw---- 1 root root 4, 35 Feb 24 17:35 tty35
crw-rw---- 1 root root 4, 36 Feb 24 17:35 tty36
crw-rw---- 1 root root 4, 37 Feb 24 17:35 tty37
crw-rw---- 1 root root 4, 38 Feb 24 17:35 tty38
crw-rw---- 1 root root 4, 39 Feb 24 17:35 tty39
crw-rw---- 1 root root 4, 4 Feb 24 17:35 tty4
crw-rw---- 1 root root 4, 40 Feb 24 17:35 tty40
crw-rw---- 1 root root 4, 41 Feb 24 17:35 tty41
crw-rw---- 1 root root 4, 42 Feb 24 17:35 tty42
crw-rw---- 1 root root 4, 43 Feb 24 17:35 tty43
crw-rw---- 1 root root 4, 44 Feb 24 17:35 tty44
crw-rw---- 1 root root 4, 45 Feb 24 17:35 tty45
crw-rw---- 1 root root 4, 46 Feb 24 17:35 tty46
crw-rw---- 1 root root 4, 47 Feb 24 17:35 tty47
crw-rw---- 1 root root 4, 48 Feb 24 17:35 tty48
crw-rw---- 1 root root 4, 49 Feb 24 17:35 tty49
crw-rw---- 1 root root 4, 5 Feb 24 17:35 tty5
crw-rw---- 1 root root 4, 50 Feb 24 17:35 tty50
crw-rw---- 1 root root 4, 51 Feb 24 17:35 tty51
crw-rw---- 1 root root 4, 52 Feb 24 17:35 tty52
crw-rw---- 1 root root 4, 53 Feb 24 17:35 tty53
crw-rw---- 1 root root 4, 54 Feb 24 17:35 tty54
crw-rw---- 1 root root 4, 55 Feb 24 17:35 tty55
crw-rw---- 1 root root 4, 56 Feb 24 17:35 tty56
crw-rw---- 1 root root 4, 57 Feb 24 17:35 tty57
crw-rw---- 1 root root 4, 58 Feb 24 17:35 tty58
crw-rw---- 1 root root 4, 59 Feb 24 17:35 tty59
crw-rw---- 1 root root 4, 6 Feb 24 17:35 tty6
crw-rw---- 1 root root 4, 60 Feb 24 17:35 tty60
crw-rw---- 1 root root 4, 61 Feb 24 17:35 tty61
crw-rw---- 1 root root 4, 62 Feb 24 17:35 tty62
crw-rw---- 1 root root 4, 63 Feb 24 17:35 tty63
crw-rw---- 1 root root 4, 7 Feb 24 17:35 tty7
crw-rw---- 1 root root 4, 8 Feb 24 17:35 tty8
crw-rw---- 1 root root 4, 9 Feb 24 17:35 tty9
crw-rw---- 1 root root 5, 3 Feb 24 17:35 ttyprintk
crw-rw---- 1 root root 4, 64 Feb 24 17:35 ttyS0
crw-rw---- 1 root root 4, 65 Feb 24 17:35 ttyS1
crw-rw---- 1 root root 4, 74 Feb 24 17:35 ttyS10
crw-rw---- 1 root root 4, 75 Feb 24 17:35 ttyS11
crw-rw---- 1 root root 4, 76 Feb 24 17:35 ttyS12
crw-rw---- 1 root root 4, 77 Feb 24 17:35 ttyS13
crw-rw---- 1 root root 4, 78 Feb 24 17:35 ttyS14
crw-rw---- 1 root root 4, 79 Feb 24 17:35 ttyS15
crw-rw---- 1 root root 4, 80 Feb 24 17:35 ttyS16
crw-rw---- 1 root root 4, 81 Feb 24 17:35 ttyS17
crw-rw---- 1 root root 4, 82 Feb 24 17:35 ttyS18
crw-rw---- 1 root root 4, 83 Feb 24 17:35 ttyS19
crw-rw---- 1 root root 4, 66 Feb 24 17:35 ttyS2
crw-rw---- 1 root root 4, 84 Feb 24 17:35 ttyS20
crw-rw---- 1 root root 4, 85 Feb 24 17:35 ttyS21
crw-rw---- 1 root root 4, 86 Feb 24 17:35 ttyS22
crw-rw---- 1 root root 4, 87 Feb 24 17:35 ttyS23
crw-rw---- 1 root root 4, 88 Feb 24 17:35 ttyS24
crw-rw---- 1 root root 4, 89 Feb 24 17:35 ttyS25
crw-rw---- 1 root root 4, 90 Feb 24 17:35 ttyS26
crw-rw---- 1 root root 4, 91 Feb 24 17:35 ttyS27
crw-rw---- 1 root root 4, 92 Feb 24 17:35 ttyS28
crw-rw---- 1 root root 4, 93 Feb 24 17:35 ttyS29
crw-rw---- 1 root root 4, 67 Feb 24 17:35 ttyS3
crw-rw---- 1 root root 4, 94 Feb 24 17:35 ttyS30
crw-rw---- 1 root root 4, 95 Feb 24 17:35 ttyS31
crw-rw---- 1 root root 4, 68 Feb 24 17:35 ttyS4
crw-rw---- 1 root root 4, 69 Feb 24 17:35 ttyS5
crw-rw---- 1 root root 4, 70 Feb 24 17:35 ttyS6
crw-rw---- 1 root root 4, 71 Feb 24 17:35 ttyS7
crw-rw---- 1 root root 4, 72 Feb 24 17:35 ttyS8
crw-rw---- 1 root root 4, 73 Feb 24 17:35 ttyS9
drwxr-xr-x 3 root root 60 Feb 24 17:00 .udev
crw------- 1 root root 10, 239 Feb 24 17:32 uhid
crw-rw---- 1 root root 10, 223 Feb 24 17:35 uinput
crw-rw---- 1 root root 1, 9 Feb 24 17:35 urandom
crw-rw---- 1 root root 7, 0 Feb 24 17:35 vcs
crw-rw---- 1 root root 7, 1 Feb 24 17:35 vcs1
crw-rw---- 1 root root 7, 2 Feb 24 17:35 vcs2
crw-rw---- 1 root root 7, 3 Feb 24 17:35 vcs3
crw-rw---- 1 root root 7, 4 Feb 24 17:35 vcs4
crw-rw---- 1 root root 7, 5 Feb 24 17:35 vcs5
crw-rw---- 1 root root 7, 6 Feb 24 17:35 vcs6
crw-rw---- 1 root root 7, 7 Feb 24 17:35 vcs7
crw-rw---- 1 root root 7, 128 Feb 24 17:35 vcsa
crw-rw---- 1 root root 7, 129 Feb 24 17:35 vcsa1
crw-rw---- 1 root root 7, 130 Feb 24 17:35 vcsa2
crw-rw---- 1 root root 7, 131 Feb 24 17:35 vcsa3
crw-rw---- 1 root root 7, 132 Feb 24 17:35 vcsa4
crw-rw---- 1 root root 7, 133 Feb 24 17:35 vcsa5
crw-rw---- 1 root root 7, 134 Feb 24 17:35 vcsa6
crw-rw---- 1 root root 7, 135 Feb 24 17:35 vcsa7
drwxr-xr-x 2 root root 60 Feb 24 17:00 vfio
crw-rw---- 1 root root 10, 63 Feb 24 17:35 vga_arbiter
drwxr-xr-x 2 root root 220 Feb 24 16:59 vg_s1200
crw------- 1 root root 10, 137 Feb 24 17:32 vhci
crw-rw---- 1 root root 10, 238 Feb 24 17:35 vhost-net
crw-rw---- 1 root root 1, 5 Feb 24 17:35 zero
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu in Ubuntu.
https://bugs.launchpad.net/bugs/1549361
Title:
/dev/kvm has wrong permissions
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1549361/+subscriptions
More information about the Ubuntu-server-bugs
mailing list