root@localhost:/etc/apparmor.d# hello-world.echo plop
unable to mount '/dev/pts/ptmx'->'/dev/ptmx'. errmsg: Permission denied
root@localhost:/etc/apparmor.d# dmesg | grep -i fail | tail -n 1
[ 308.080449] type=1400 audit(1455208377.229:17): apparmor="DENIED"
operation="mount" info="failed mntpnt match" error=-13 parent=914
profile="/usr/bin/ubuntu-core-launcher" name="/dev/ptmx/" pid=915
comm="ubuntu-core-lau" srcname="/dev/pts/ptmx/" flags="rw, bind"
root@localhost:/etc/apparmor.d# mount -o bind,rw /dev/pts/ptmx /dev/ptmx
root@localhost:/etc/apparmor.d# mount | grep ptmx
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
devpts on /dev/ptmx type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
root@localhost:/etc/apparmor.d# cat usr.bin.ubuntu-core-launcher | grep ptmx
mount options=(rw bind) /dev/pts/ptmx -> /dev/ptmx, # for bind mounting
root@localhost:/etc/apparmor.d# snap list
Name Version Developer
canonical-pi2 3.2 canonical
canonical-pi2-linux 4.4.0-1009-raspi2+20160421.13-36 canonical
hello-world 6.0 canonical
ubuntu-core 16.04+20160420.05-14 canonical
wifid 1.5