I have installed libvirt-daemon on a fully updated Ubuntu Server 18.04.1 LTS. When trying to execute libvirtd --listen, the following errors arise:
2018-08-24 21:03:18.641+0000: 2855: error : virFileReadAll:1420 : Failed to open file '/sys/kernel/security/apparmor/profiles': Permission denied
2018-08-24 21:03:18.641+0000: 2855: error : profile_status:100 : Failed to read AppArmor profiles list '/sys/kernel/security/apparmor/profiles': Permission denied
The output of sudo ls -l /sys/kernel/security/apparmor/profiles is:
-r--r--r-- 1 root root 0 Aug 24 13:21 /sys/kernel/security/apparmor/profiles
My suspicion is that the permissions of /sys/kernel/security/apparmor/profiles should be 555. The errors seem completely due to misconfigured permissions, as sudo libvirtd --listen runs without errors. However, I would rather not run libvirtd with root permissions on my system. Disabling apparmor would also probably get rid of the error, but I would rather not do that either.
My question is then, is this a misconfiguration error, and if so, is it a misconfigured libvirt or a misconfigured apparmor? If not, what is the cause of these errors?