4

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?

Mohamed Laradji
  • 143
  • 2
  • 10
  • on Ubuntu 18.04.2 LTS, the file /sys/kernel/security/apparmor/profiles is -r--r--r--, and everything is OK! the problem is elsewhere... – MaxiReglisse Aug 05 '19 at 19:50
  • Same problem here. I checked all the permissions of every parent folder and all are set to allow reading for all. profiles is -r--r--r-- but when I do cat profiles, I get permission denied. I can only view it as root. – thebunnyrules Sep 15 '19 at 22:20

0 Answers0