network-manager dbus connection gets denied by appamor on snap package
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snappy-hwe-snaps |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I've installed the current version of Ubuntu Server and upgraded to the newest version. As netplan does not handle cellular interfaces I've installed network-manager to handle WWAN device via modem-manager.
As there is not a version of modem-manager in the apt repo I've installed both (network-manager and modem-manager) via snap
I've configured netplan to use network manager only (/etc/netplan/
network:
renderer: NetworkManager
version: 2
Restarted the machine and logged in again. Network-manager service is running and I got a DHCP address. However, modem-manager server failed to start as well as the nm-cli is not able to connect to the dbus service.
journalctl output:
Sep 16 08:29:21 nuc1 audit[989]: USER_AVC pid=989 uid=103 auid=4294967295 ses=4294967295 msg='apparmor=
Sep 16 08:29:21 nuc1 kernel: audit: type=1107 audit(156862256
Sep 16 08:29:21 nuc1 NetworkManager[
Sep 16 08:29:26 nuc1 systemd-
Sep 16 08:29:26 nuc1 kernel: IPv6: ADDRCONF(
Sep 16 08:29:26 nuc1 systemd-
Sep 16 08:30:29 nuc1 systemd-
Sep 16 08:30:29 nuc1 kernel: IPv6: ADDRCONF(
Sep 16 08:30:29 nuc1 systemd-
Sep 16 08:31:21 nuc1 audit[989]: USER_AVC pid=989 uid=103 auid=4294967295 ses=4294967295 msg='apparmor=
Sep 16 08:31:21 nuc1 NetworkManager[
Sep 16 08:31:21 nuc1 kernel: audit: type=1107 audit(156862268
When executing: sudo nmcli r
[sudo] password for fischer:
(process:3569): nmcli-CRITICAL **: Error: Could not create NMClient object: Could not connect: Permission denied.
the snappy debug output shows
INFO: $ sudo journalctl --output=short --follow --all | sudo snappy-debug
kernel.
= AppArmor =
Time: Sep 16 08:40:09
Log: apparmor="DENIED" operation="connect" profile=
File: /run/dbus/
Suggestions:
* adjust program to use $SNAP_DATA
* adjust program to use /run/shm/
* adjust program to use /run/snap.
* adjust snap to use snap layouts (https:/
^C
This results that I cannot configure network-manager via cli.
Additional information
Linux nuc1 4.15.0-62-generic #69-Ubuntu SMP Wed Sep 4 20:55:53 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Changed in snappy-hwe-snaps: | |
status: | New → Invalid |
On desktop, not all NM interfaces are auto-connected, you will need to run
$ snap connect network- manager: nmcli
to get rid of the errors. Said this, there *is* a deb package for MM that you can install instead of using snaps:
$ sudo apt install modemmanager
In general, NM/MM snaps are optimized for Ubuntu Core, so in your case it will be probably better to use debs for these concrete services.