From 8d61ad7c8a76adf378a319245d655cf0fce18d25 Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 12 Feb 2012 15:43:28 +0100 Subject: manage selinux stuff --- manifests/defaultphpdirs.pp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'manifests/defaultphpdirs.pp') diff --git a/manifests/defaultphpdirs.pp b/manifests/defaultphpdirs.pp index eba060a..e8b3e4e 100644 --- a/manifests/defaultphpdirs.pp +++ b/manifests/defaultphpdirs.pp @@ -1,12 +1,21 @@ class apache::defaultphpdirs { - file{'/var/www/upload_tmp_dir': + file{ + '/var/www/upload_tmp_dir': ensure => directory, require => Package['apache'], owner => root, group => 0, mode => 0755; - } - file{'/var/www/session.save_path': + '/var/www/session.save_path': ensure => directory, require => Package['apache'], owner => root, group => 0, mode => 0755; } + + if $::selinux != 'false' { + selinux::fcontext{ + ['/var/www/upload_tmp_dir/.+(/.*)?', + '/var/www/session.save_path/.+(/.*)?']: + setype => 'httpd_sys_rw_content_t', + before => File['/var/www/upload_tmp_dir','/var/www/session.save_path']; + } + } } -- cgit v1.2.3