Skip to content

Instantly share code, notes, and snippets.

@bluecmd
Created August 25, 2023 17:06
Show Gist options
  • Save bluecmd/db81b840ea781bff4c734e407f2f085b to your computer and use it in GitHub Desktop.
Save bluecmd/db81b840ea781bff4c734e407f2f085b to your computer and use it in GitHub Desktop.
AppArmor profile for audiobookshelf
$ cat /etc/apparmor.d/usr.share.audiobookshelf.audiobookshelf
#include <tunables/global>
# vim:syntax=apparmor
/usr/share/audiobookshelf/audiobookshelf {
#include <abstractions/base>
#include <abstractions/nameservice>
#include <abstractions/openssl>
#include <abstractions/user-tmp>
/srv/audiobooks/** r,
/usr/lib/audiobookshelf-ffmpeg/ffmpeg mrix,
/usr/lib/audiobookshelf-ffmpeg/ffprobe mrix,
/usr/share/audiobookshelf/audiobookshelf r,
owner /tmp/** mrw,
owner /usr/share/audiobookshelf/config/ r,
owner /usr/share/audiobookshelf/config/absdatabase.sqlite rwk,
owner /usr/share/audiobookshelf/config/absdatabase.sqlite-journal rw,
owner /usr/share/audiobookshelf/metadata/** rw,
owner /usr/share/audiobookshelf/metadata/logs/daily/*.txt rw,
owner /usr/share/audiobookshelf/metadata/logs/scans/*.txt w,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment