apparmor/profiles/apparmor.d/abstractions/php-worker
Antonio Russo 660ce39937 Add php-fpm isolation with apparmor hats
Adapted from https://nordisch.org/posts/php-fpm-apparmor/, port the
nextcloud-independent portion of the php-fpm worker abstractions and
php-fpm isolation for more general usage.

Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com>
2020-08-16 12:11:00 -06:00

22 lines
569 B
Text

# vim:syntax=apparmor
# This file contains basic permissions for php-fpm workers
abi <abi/3.0>,
# load common libraries and their support files
include <abstractions/base>
# common php files and support files that php needs
include <abstractions/php>
signal (receive) peer=/usr/sbin/php-fpm*,
# This is some php opcaching file
/tmp/.ZendSem.* rwk,
# I think this is adaptive memory management
/sys/devices/system/node/* r,
/sys/devices/system/node/*/meminfo r,
/sys/devices/system/node/ r,
include if exists <abstractions/php-worker.d>