AFixd applying nopublick option

This commit is contained in:
Alexey Berezhok
2024-06-12 15:58:13 +03:00
parent 694825461a
commit 12d787ea87
4 changed files with 26 additions and 9 deletions

View File

@@ -221,6 +221,11 @@ rebuild_user_conf() {
# WEB domain rebuild
rebuild_web_domain_conf() {
WWW_USER="www-data"
if [ -f /etc/redhat-release ]; then
WWW_USER="apache"
fi
if [ "$WEB_SYSTEM" = "httpd" ]; then
confd="conf.h.d"
else
@@ -478,7 +483,7 @@ rebuild_web_domain_conf() {
$HOMEDIR/$user/web/$domain/document_errors
chmod 640 /var/log/$WEB_SYSTEM/domains/$domain.*
chown --no-dereference $user:www-data $HOMEDIR/$user/web/$domain/public_*html
chown --no-dereference $user:$WWW_USER $HOMEDIR/$user/web/$domain/public_*html
}
# DNS domain rebuild
rebuild_dns_domain_conf() {

View File

@@ -606,6 +606,10 @@ upgrade_phppgadmin() {
}
upgrade_phpmyadmin() {
WWW_USER="www-data"
if [ -f /etc/redhat-release ]; then
WWW_USER="apache"
fi
# Check if MariaDB/MySQL is installed on the server before attempting to install or upgrade phpMyAdmin
if [ -n "$(echo $DB_SYSTEM | grep -w 'mysql')" ]; then
pma_version=$(jq -r .version /usr/share/phpmyadmin/package.json)
@@ -613,7 +617,7 @@ upgrade_phpmyadmin() {
echo "[ * ] phpMyAdmin is up to date (${pma_version})..."
# Update permissions
if [ -e /var/lib/phpmyadmin/blowfish_secret.inc.php ]; then
chown root:www-data /var/lib/phpmyadmin/blowfish_secret.inc.php
chown root:$WWW_USER /var/lib/phpmyadmin/blowfish_secret.inc.php
chmod 0640 /var/lib/phpmyadmin/blowfish_secret.inc.php
fi
else
@@ -639,13 +643,13 @@ upgrade_phpmyadmin() {
# Create temporary folder and change permissions
if [ ! -d /usr/share/phpmyadmin/tmp ]; then
mkdir /usr/share/phpmyadmin/tmp
chown root:www-data /usr/share/phpmyadmin/tmp
chown root:$WWW_USER /usr/share/phpmyadmin/tmp
chmod 0770 /usr/share/phpmyadmin/tmp
fi
if [ -e /var/lib/phpmyadmin/blowfish_secret.inc.php ]; then
chown root:www-data /var/lib/phpmyadmin/blowfish_secret.inc.php
chown root:$WWW_USER /var/lib/phpmyadmin/blowfish_secret.inc.php
chmod 0640 /var/lib/phpmyadmin/blowfish_secret.inc.php
fi