Openat returning EPERM for /dev/sg0

Note, my suggested changes to the udev rules assumed you kept the apparmor rules changes. Assuming you made the changes to apparmor, loaded them into the kernel, made the udev changes and called sudo udevadm trigger, then after your snap runs, what:

  1. is in /sys/fs/cgroup/devices/snap.<snap>.<command>/devices.list?
  2. is the output of ls -l /dev/sg0?
  3. is your user in the ‘cdrom’ group?