Skip to content

Latest commit

 

History

History
executable file
·
33 lines (16 loc) · 712 Bytes

File metadata and controls

executable file
·
33 lines (16 loc) · 712 Bytes

Creation AppArmor Profiles

In this section, we will take a look at Creation AppArmor Profiles.

A simple bash script

#!/bin/bash
data_directory=/opt/app/data
mkdir -p ${data_directory}
echo "=>  File created at `date`" | tee $(data_directory) create.log

simpleBashScript

Install AppArmor utils package

sudo apt install  apparmor-utils -y

Create a profile for bash script

aa-genprof /root/add_data.sh

apparmorprofileBash

Run a bash script from a different window

./add_data.sh