1

Hi I`m new to using apparmor. So i created a simple script on my Debian 10 to look how apparmor works:
#! /bin/sh echo "hi from Apparmor">/tmp/hi.txt cat /tmp/hi.txt rm /tmp/hi.txt

Then I saved the file as s.sh and try to generate a profile: enter image description here

Please tell me how i can solve this problem. Thank for any answer!

Adi Dembak
  • 2,433
  • 2
  • 18
  • 26
Romyl Rem
  • 11
  • 2

1 Answers1

0

This is a known bug in Debian Buster.
You can solve this by creating missing files until it works.

Source :

In the following example, we will thus try to create a profile for /sbin/dhclient. For this we will use aa-genprof dhclient. In Debian Buster there is a known bug[6] that makes the previous command fail with the following error: ERROR: Include file /etc/apparmor.d/local/usr.lib.dovecot.deliver not found. To fix it create the missing files with touch file. It will invite you to use the application in another window and when done to come back to aa-genprof to scan for AppArmor events in the system logs and convert those logs into access rules. For each logged event, it will make one or more rule suggestions that you can either approve or further edit in multiple ways:

https://debian-handbook.info/browse/fr-FR/stable/sect.apparmor.html

paaacman
  • 3,012
  • 1
  • 20
  • 18