Discord ptrace AppArmor denials

Which permissions do you not want to grant? system-observe? Note that while snapd allows the user to choose whether or not to connect interfaces, it doesn’t (currently) allow a means to control the logging of the snap. This and more generally not supporting hand-tweaking snap app policy was taken as an early design decision for snapd. This could be revisited (I would suggest another forum topic though).

If you are choosing to not connect requested interfaces, then you’ll need to find some other means to manage policy denials. rsyslog for example allows ignoring log entries so they don’t hit the disk (I’m not aware of a way to do this with journald though). You could also modify /var/lib/snapd/apparmor/profiles/snap.discord.discord to have:

deny ptrace (trace),

Then do ‘sudo apparmor_parser -r /var/lib/snapd/apparmor/profiles/snap.discord.discord’. Because of how snapd manages its profiles, you will have to periodically re-add the above rule to the profile.