Fixed SELinux contexts from Apache log directories.

This commit is contained in:
Timo Mkinen 2012-08-28 08:50:56 +03:00
parent 458854708c
commit c69fb5afb0
2 changed files with 26 additions and 7 deletions

View file

@ -32,6 +32,11 @@ class apache::common {
type => "httpd_sys_content_t",
before => File[$apache_datadir],
}
selinux::manage_fcontext { "${apache_datadir}/log(/.*)?":
type => "httpd_log_t",
before => File["/srv/www/log"],
require => Selinux::Manage_fcontext["${apache_datadir}(/.*)?"],
}
file { "/srv/www":
ensure => link,
target => $apache_datadir,
@ -44,13 +49,18 @@ class apache::common {
owner => root,
group => root,
}
selinux::manage_fcontext { "/srv/www/log(/.*)?":
type => "httpd_log_t",
before => File["/srv/www/log"],
}
}
file { "/srv/www/log":
ensure => directory,
mode => "0755",
owner => root,
group => root,
owner => "root",
group => "root",
seltype => "httpd_log_t",
require => File["/srv/www"],
}