Commit 677ccf515ad27618bf370b65c4021003e04732de

Authored by Macartur Sousa
1 parent 9449afc7

Added permission to access static files noosfero

Signed-off-by: Macartur Sousa <macartur.sc@gmail.com>
cookbooks/noosfero/files/noosfero.te 0 → 100644
... ... @@ -0,0 +1,11 @@
  1 +
  2 +module noosfero 1.0;
  3 +
  4 +require {
  5 + type initrc_tmp_t;
  6 + type httpd_t;
  7 + class file open;
  8 +}
  9 +
  10 +#============= httpd_t ==============
  11 +allow httpd_t initrc_tmp_t:file open;
... ...
cookbooks/noosfero/recipes/default.rb
... ... @@ -66,3 +66,16 @@ template &#39;/etc/nginx/conf.d/noosfero.conf&#39; do
66 66 source 'nginx.conf.erb'
67 67 notifies :restart, 'service[nginx]'
68 68 end
  69 +
  70 +###############################################
  71 +# SELinux: permission to access static files noosfero
  72 +################################################
  73 +
  74 +cookbook_file '/etc/selinux/local/noosfero.te' do
  75 + notifies :run, 'execute[selinux-noosfero]'
  76 +end
  77 +
  78 +execute 'selinux-noosfero' do
  79 + command 'selinux-install-module /etc/selinux/local/noosfero.te'
  80 + action :nothing
  81 +end
... ...