Enable udisks2 interface in pi-gadget for UC20

After I added a system-files interface most of the errors are removed except one:

2021-11-01T10:29:39Z systemd[1]: snap.automount.automount.service: Succeeded. 2021-11-25T10:35:34Z systemd[1]: Stopping Service for snap application automount.udisksd… 2021-11-25T10:35:34Z systemd[1]: snap.automount.udisksd.service: Succeeded. 2021-11-25T10:35:34Z systemd[1]: Stopped Service for snap application automount.udisksd. 2021-11-25T10:35:34Z systemd[1]: Started Service for snap application automount.udisksd. 2021-11-25T10:35:35Z -[3590]: udisks daemon version 2.6.4 starting 2021-11-25T10:35:35Z systemd[1]: Started Service for snap application automount.automount. 2021-11-25T10:35:36Z -[3590]: Acquired the name org.freedesktop.UDisks2 on the system message bus 2021-11-25T10:35:40Z automount.automount[3642]: Error connecting to the udisks daemon: Could not connect: Permission denied 2021-11-25T10:35:40Z systemd[1]: snap.automount.automount.service: Succeeded.

which is

2021-11-25T10:35:40Z automount.automount[3642]: Error connecting to the udisks daemon: Could not connect: Permission denied

and snappy-debug output:

Log: apparmor=“DENIED” operation=“connect” profile=“snap.automount.automount” name="/run/dbus/system_bus_socket" pid=3642 comm=“udisksctl” requested_mask=“wr” denied_mask=“wr” fsuid=0 ouid=0 File: /run/dbus/system_bus_socket (write) Suggestions:

  • adjust program to use $SNAP_DATA
  • adjust program to use /run/shm/snap.$SNAP_NAME.*
  • adjust program to use /run/snap.$SNAP_NAME.*
  • adjust snap to use snap layouts (Snap layouts)