From 93184de8eb194052aac89b22cd97b60c03bbca7f Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Fri, 4 Dec 2020 17:22:53 +0100 Subject: [PATCH] Fixed oopsie in Selinux webdir --- CMS/nextcloud/conf.sh | 4 ++-- CMS/none/conf.sh | 4 ++-- CMS/wordpress/conf.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMS/nextcloud/conf.sh b/CMS/nextcloud/conf.sh index fd8c8d1..73e6b14 100644 --- a/CMS/nextcloud/conf.sh +++ b/CMS/nextcloud/conf.sh @@ -41,8 +41,8 @@ chown "$sitename":"$sitename" -R /var/www/"$domain"/html if [ "$shortdist" = "cent8" ]; then #Setting SeLiux perms for centos - semanage fcontext -a -t httpd_sys_rw_content_t /var/www/"$domain"/html > $OUTPUT 2>&1 - restorecon -vr /var/www/ > $OUTPUT 2>&1 + semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/$domain/html(/.*)?" > $OUTPUT 2>&1 + restorecon -vr /var/www/ > $OUTPUT 2>&1 fi diff --git a/CMS/none/conf.sh b/CMS/none/conf.sh index 82b124a..cf3e561 100644 --- a/CMS/none/conf.sh +++ b/CMS/none/conf.sh @@ -20,8 +20,8 @@ chown "$sitename":"$sitename" -R /var/www/"$domain"/html if [ "$shortdist" = "cent8" ]; then #Setting SeLiux perms for centos - semanage fcontext -a -t httpd_sys_rw_content_t /var/www/"$domain"/html > $OUTPUT 2>&1 - restorecon -vr /var/www/ > $OUTPUT 2>&1 + semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/$domain/html(/.*)?" > $OUTPUT 2>&1 + restorecon -vr /var/www/ > $OUTPUT 2>&1 fi diff --git a/CMS/wordpress/conf.sh b/CMS/wordpress/conf.sh index 6d66198..15b5d91 100644 --- a/CMS/wordpress/conf.sh +++ b/CMS/wordpress/conf.sh @@ -50,7 +50,7 @@ chown "$sitename":"$sitename" -R /var/www/"$domain"/html if [ "$shortdist" = "cent8" ]; then #Setting SeLiux perms for centos - semanage fcontext -a -t httpd_sys_rw_content_t /var/www/"$domain"/html > $OUTPUT 2>&1 + semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/$domain/html(/.*)?" > $OUTPUT 2>&1 restorecon -vr /var/www/ > $OUTPUT 2>&1 fi