[pkg-apparmor] Apparmor + Snap
Alexandros Vangelatos
alecos85 at gmail.com
Thu Sep 22 20:42:28 BST 2022
Hello all,
I had another bug with apparmor, trying to install a snap package.
snap downloads the package, but when it tries to install it fails on
apparmor_parser.
This is the error message is below.
(9) security profiles (cannot setup profiles for snap "electronplayer":
cannot load apparmor profiles: exec: "apparmor_parser": executable file not
found in $PATH
apparmor_parser output:
I did set my path to include /usr/sbin, that didn't work.
What worked was i created a sym link
/usr/*sbin*/apparmor_parser to /usr/*bin*/apparmor_parser.
That resolved it for me. For some reason it's looking for apparmor_parser
in the wrong directory.
What's strange is that it used to work fine a few months ago, Im not sure
if there a bug with a recent update.
I'm running
apparmor_parser --version
2.13.6
snap --version
snap 2.57.1
snapd 2.57.1
series 16
debian 11
kernel 5.10.0-18-amd64
apt show snapd
Package: snapd
Version: 2.49-1+deb11u1
Built-Using: golang-1.15 (= 1.15.15-1~deb11u2), golang-check.v1 (=
0.0+git20200902.038fdea-1), golang-dbus (= 5.0.3-2),
golang-github-boltdb-bolt (= 1.3.1-7), golang-github-coreos-go-systemd (=
22.1.0-3), golang-github-gorilla-mux (= 1.7.4-1),
golang-github-juju-ratelimit (= 1.0.1-1.1),
golang-github-mvo5-goconfigparser (= 0.2.2-1),
golang-github-seccomp-libseccomp-golang (= 0.9.1-2), golang-go-flags (=
1.4.0-2), golang-go.crypto (= 1:0.0~git20201221.eec23a3-1),
golang-golang-x-sys (= 0.0~git20210124.22da62e-1), golang-golang-x-term (=
0.0~git20201210.2321bbc-1), golang-golang-x-xerrors (=
0.0~git20191204.9bdfabe-1), golang-gopkg-macaroon.v1 (=
0.0~git20150121.0.ab3940c-1.1), golang-gopkg-mgo.v2 (= 2016.08.01-7),
golang-gopkg-retry.v1 (= 0.0~git20161025.0.c09f6b8-1.1),
golang-gopkg-tomb.v2 (= 0.0~git20161208.d5d1b58-3), golang-pretty (=
0.2.1+git20200831.59b4212-1), golang-text (= 0.2.0-1), golang-yaml.v2 (=
2.4.0-1), libcap2 (= 1:2.44-1)
Priority: optional
Section: devel
Maintainer: Michael Hudson-Doyle <mwhudson at debian.org>
Installed-Size: 56.4 MB
Depends: adduser, apparmor (>= 2.10.95-5), ca-certificates, gnupg1 | gnupg,
openssh-client, squashfs-tools, systemd, udev, libapparmor1 (>=
2.7.0~beta1+bzr1772), libc6 (>= 2.27), libcap2 (>= 1:2.10), libseccomp2 (>=
2.4.1), libudev1 (>= 183)
Recommends: gnupg
Suggests: zenity | kdialog
Conflicts: snap (<< 2013-11-29-1ubuntu1)
Breaks: snap-confine (<< 2.23), snapd-xdg-open (<= 0.0.0),
ubuntu-core-launcher (<< 2.22), ubuntu-snappy (<< 1.9), ubuntu-snappy-cli
(<< 1.9)
Replaces: snap-confine (<< 2.23), snapd-xdg-open (<= 0.0.0),
ubuntu-core-launcher (<< 2.22), ubuntu-snappy (<< 1.9), ubuntu-snappy-cli
(<< 1.9)
Homepage: https://github.com/snapcore/snapd
Download-Size: 13.3 MB
APT-Manual-Installed: yes
APT-Sources: http://deb.debian.org/debian bullseye/main amd64 Packages
Description: Daemon and tooling that enable snap packages
Install, configure, refresh and remove snap packages. Snaps are
'universal' packages that work across many different Linux systems,
enabling secure distribution of the latest apps and utilities for
cloud, servers, desktops and the internet of things.
.
Start with 'snap list' to see installed snaps.
I've also attached asciinema cast.
I forgot to type "which apparmor_parser" in the cast before the sym link,
the result is.
/sbin/apparmor_parser
after the sym link, the result is
/usr/bin/apparmor_parser
Enjoy the cast, I hope this helps someone.
--
Regards,
Alexandros Vangelatos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-apparmor-team/attachments/20220922/8946deab/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: apparmor_snap.ascii.cast
Type: application/octet-stream
Size: 1619780 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-apparmor-team/attachments/20220922/8946deab/attachment-0001.obj>
More information about the pkg-apparmor-team
mailing list