#!/usr/bin/perl ################################################################################ # A script that updates the SELinux permissions of the FosWiki installation # whose root directory is given on the commandline ################################################################################ use strict; use warnings; # This is the script installation base my $dir = "/usr/local/toolbox"; # Pull in some functions require "$dir/intro.pl"; # --- # Check that the foswiki root has been correctly passed; if intro() returns, all is cool # --- my ( $root, $bin, $data, $lib, $locale, $pub, $templates, $tools, $working ) = intro(); # Give httpd file access system("chcon","-vR","--type=httpd_sys_content_t", $root); # Give httpd script access system("chcon","-vR","--type=httpd_sys_script_exec_t", $bin); # Give httpd write access system("chcon","-vR","--type=httpd_sys_rw_content_t", $lib, $working, $templates, $data, $pub);