Hiawatha version: 6.17.1
Operating System: Ubuntu 9.04 Server
Working environment : PHP5, MySQL and CGI-Wrapper
I would like to share my Apparmor profile for Hiawatha, PHP5 and MySQL with CGI-Wrapper on my Ubuntu 9.04 Server.
Content of
usr.sbin.hiawatha :
# Last Modified: Mon Sep 21 04:49:57 2009
#include <tunables/global>
/usr/sbin/hiawatha {
#include <abstractions/base>
capability chown,
capability dac_override,
capability net_bind_service,
capability setgid,
capability setuid,
capability sys_chroot,
network inet tcp,
/etc/group r,
/etc/hiawatha/** r,
/etc/host.conf r,
/etc/hosts r,
/etc/nsswitch.conf r,
/etc/passwd r,
/etc/php5/cgi/php.ini r,
/etc/php5/conf.d/ r,
/etc/php5/conf.d/curl.ini r,
/etc/php5/conf.d/gd.ini r,
/etc/php5/conf.d/idn.ini r,
/etc/php5/conf.d/imagick.ini r,
/etc/php5/conf.d/imap.ini r,
/etc/php5/conf.d/mcrypt.ini r,
/etc/php5/conf.d/memcache.ini r,
/etc/php5/conf.d/mhash.ini r,
/etc/php5/conf.d/ming.ini r,
/etc/php5/conf.d/mysql.ini r,
/etc/php5/conf.d/mysqli.ini r,
/etc/php5/conf.d/pdo.ini r,
/etc/php5/conf.d/pdo_mysql.ini r,
/etc/php5/conf.d/ps.ini r,
/etc/php5/conf.d/pspell.ini r,
/etc/php5/conf.d/recode.ini r,
/etc/php5/conf.d/tidy.ini r,
/etc/php5/conf.d/xsl.ini r,
/etc/protocols r,
/etc/resolv.conf r,
/etc/services r,
/usr/bin/php5-cgi rix,
/usr/lib{,32,64}/** mr,
/usr/sbin/cgi-wrapper rix,
/usr/sbin/hiawatha mr,
/usr/share/dbconfig-common/** r,
/usr/share/file/magic.mime r,
/usr/share/mysql/charsets/Index.xml r,
/usr/share/phpmyadmin/ r,
/usr/share/phpmyadmin/** r,
/usr/share/zoneinfo/ r,
/var/lib/** r,
/var/lib/hiawatha/* rw,
/var/log/hiawatha/* r,
/var/log/hiawatha/** rw,
owner /var/run/hiawatha.pid rw,
/var/www/ r,
/var/www/** rw,
}
Samiux
The Hiawatha's happy user