diff options
author | mh <mh@immerda.ch> | 2012-02-12 15:43:28 +0100 |
---|---|---|
committer | mh <mh@immerda.ch> | 2012-02-12 15:43:28 +0100 |
commit | 8d61ad7c8a76adf378a319245d655cf0fce18d25 (patch) | |
tree | d54fbf9bbdb80573d2086ed19a965c493b6d7ee3 /manifests/defaultphpdirs.pp | |
parent | 89495dae91ac87b7dad314d6e1c3737913865e2b (diff) |
manage selinux stuff
Diffstat (limited to 'manifests/defaultphpdirs.pp')
-rw-r--r-- | manifests/defaultphpdirs.pp | 15 |
1 files changed, 12 insertions, 3 deletions
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']; + } + } } |