Updated SeLinux for web folder once again
This commit is contained in:
@@ -9,4 +9,20 @@ useradd -g "$sitename" "$sitename"
|
||||
|
||||
systemctl reload $phpFPMService
|
||||
|
||||
#Creating webfolder
|
||||
mkdir -p /var/www/"$domain"/html
|
||||
|
||||
#Ceating content
|
||||
echo "<html><head></head><body>$webserv has been succsefully installed by the Wizard</body></html>" > /var/www/$domain/html/index.html
|
||||
|
||||
#Setting Permsissions
|
||||
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
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
Reference in New Issue
Block a user