I am trying to run firewall (Zentyal) on Ubuntu 16.04 inside an LXD container on top of host Arch linux. It requires some AppArmor functionality to do its thing (mainly, DHCP), so I installed AppArmor-enabled kernel on the host and set up the LXD config according to every pointed I found in the internet that related to AppArmor, so it no looks like so:
name: router
profiles:
- default
config:
raw.lxc: lxc.aa_profile= unconfined
security.nesting: "true"
security.privileged: "true"
volatile.base_image: 9c774bed40a5a8a34c2c96c1a93f4d46b0f59cda96defc07bc2c29cf473beb22
volatile.eth0.name: eth0
volatile.eth1.name: eth1
volatile.last_state.idmap: '[]'
volatile.last_state.power: RUNNING
devices:
eth0:
nictype: physical
parent: enp2s0
type: nic
eth1:
nictype: bridged
parent: br0
type: nic
root:
path: /
type: disk
ephemeral: false
However, I am still getting those errors in Zentyal logs:
2016/12/22 22:56:48 ERROR> Service.pm:964 EBox::Module::Service::restartService - root command /sbin/apparmor_parser --write-cache --replace /etc/apparmor.d/usr.sbin.named failed.
2016/12/22 22:59:43 ERROR> Sudo.pm:240 EBox::Sudo::_rootError - root command /sbin/apparmor_parser --write-cache --replace /etc/apparmor.d/usr.sbin.dhcpd failed.
2016/12/22 22:59:43 ERROR> Service.pm:962 EBox::Module::Service::restartService - Error restarting service: root command /sbin/apparmor_parser --write-cache --replace /etc/apparmor.d/usr.sbin.dhcpd failed.
2016/12/22 22:59:43 ERROR> Service.pm:964 EBox::Module::Service::restartService - root command /sbin/apparmor_parser --write-cache --replace /etc/apparmor.d/usr.sbin.dhcpd failed.
2016/12/22 22:59:44 ERROR> Sudo.pm:240 EBox::Sudo::_rootError - root command /sbin/apparmor_parser --write-cache --replace /etc/apparmor.d/usr.sbin.named failed.
2016/12/22 22:59:44 ERROR> Service.pm:962 EBox::Module::Service::restartService - Error restarting service: root command /sbin/apparmor_parser --write-cache --replace /etc/apparmor.d/usr.sbin.named failed.
2016/12/22 22:59:44 ERROR> Service.pm:964 EBox::Module::Service::restartService - root command /sbin/apparmor_parser --write-cache --replace /etc/apparmor.d/usr.sbin.named failed.
And when I try to run one of those commands to get more direct error, I get this:
/sbin/apparmor_parser --write-cache --replace /etc/apparmor.d/usr.sbin.dhcpd
/sbin/apparmor_parser: Unable to replace "/usr/sbin/dhcpd". Permission denied; attempted to load a profile while confined?
Is there something more that can be done here, or is it just not doable?