Skip to content

Commit 5492a71

Browse files
committed
Make some more changes
1 parent 8c41d00 commit 5492a71

File tree

5 files changed

+29
-13
lines changed

5 files changed

+29
-13
lines changed

func/upgrade.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ upgrade_phpmyadmin() {
624624
chown root:hestiamail /var/lib/phpmyadmin/blowfish_secret.inc.php
625625
chmod 0640 /var/lib/phpmyadmin/blowfish_secret.inc.php
626626
fi
627-
chown root:hestiamail /usr/share/phpmyadmin/tmp
627+
chown hestiamail:hestiamail /usr/share/phpmyadmin/tmp
628628
chmod 0770 /usr/share/phpmyadmin/tmp
629629
else
630630
# Display upgrade information
@@ -649,7 +649,7 @@ upgrade_phpmyadmin() {
649649
# Create temporary folder and change permissions
650650
if [ ! -d /usr/share/phpmyadmin/tmp ]; then
651651
mkdir /usr/share/phpmyadmin/tmp
652-
chown root:hestiamail /usr/share/phpmyadmin/tmp
652+
chown hestiamail:hestiamail /usr/share/phpmyadmin/tmp
653653
chmod 0770 /usr/share/phpmyadmin/tmp
654654

655655
fi

install/deb/nginx/phppgadmin.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ location /%pga_alias% {
66
include /etc/nginx/fastcgi_params;
77
fastcgi_index index.php;
88
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
9-
fastcgi_param SCRIPT_FILENAME $request_filename;
10-
fastcgi_pass 127.0.0.1:9000;
9+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
10+
fastcgi_pass unix:/run/php/www.sock;
1111
}
1212
}

install/deb/pga/phppgadmin.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ allow from all
1818
<IfModule mpm_event_module>
1919
# Use www.conf instead
2020
<FilesMatch \.php$>
21-
SetHandler "proxy:fcgi://127.0.0.1:9000"
21+
SetHandler "proxy:unix:/run/php/www.sock|fcgi://localhost"
2222
</FilesMatch>
2323
</IfModule>
2424
<IfModule !mod_php5.c>

install/deb/php-fpm/www.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ listen.mode = 0660
88

99
;"hestiamail" user created to prevent users from abusing this config
1010
user = hestiamail
11-
group = www-data
11+
group = hestiamail
1212

1313
pm = ondemand
1414
pm.max_children = 4

install/upgrade/versions/1.9.0.sh

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
####### You can use \n within the string to create new lines. #######
1818
#######################################################################################
1919

20-
upgrade_config_set_value 'UPGRADE_UPDATE_WEB_TEMPLATES' 'false'
21-
upgrade_config_set_value 'UPGRADE_UPDATE_DNS_TEMPLATES' 'false'
22-
upgrade_config_set_value 'UPGRADE_UPDATE_MAIL_TEMPLATES' 'false'
20+
upgrade_config_set_value 'UPGRADE_UPDATE_WEB_TEMPLATES' 'true'
21+
upgrade_config_set_value 'UPGRADE_UPDATE_DNS_TEMPLATES' 'true'
22+
upgrade_config_set_value 'UPGRADE_UPDATE_MAIL_TEMPLATES' 'true'
2323
upgrade_config_set_value 'UPGRADE_REBUILD_USERS' 'yes'
24-
upgrade_config_set_value 'UPGRADE_UPDATE_FILEMANAGER_CONFIG' 'false'
24+
upgrade_config_set_value 'UPGRADE_UPDATE_FILEMANAGER_CONFIG' 'true'
2525

2626
# update config sftp jail
2727
$BIN/v-delete-sys-sftp-jail
@@ -92,9 +92,25 @@ if [ -s /etc/exim4/exim4.conf.template ] && ! grep -Fq "smtp_accept_max" /etc/ex
9292
sed -i '/disable_ipv6 = true/a\smtp_accept_max = 100\nsmtp_accept_max_per_host = 20' /etc/exim4/exim4.conf.template
9393
fi
9494

95-
# Update phymyadmin.inc for nginx
96-
if [ -s /etc/nginx/conf.d/phpmyadmin.inc ]; then
97-
cp -f $HESTIA_INSTALL_DIR/nginx/phpmyadmin.inc /etc/nginx/conf.d/phpmyadmin.inc
95+
# Update www.conf due security issue
96+
php_versions=$($BIN/v-list-sys-php plain)
97+
# Substitute php-fpm service name formats
98+
for version in $php_versions; do
99+
if [ -f "/etc/php/$version/fpm/pool.d/www.conf" ]; then
100+
cp -f $HESTIA_INSTALL_DIR/php-fpm/www.conf "/etc/php/$version/fpm/pool.d/www.conf"
101+
fi
102+
done
103+
104+
# Recreate PHPMYADMIN / PHPGADMIN conf correctly
105+
if [ -n "$DB_PMA_ALIAS" ]; then
106+
old=$DB_PMA_ALIAS
107+
$BIN/v-change-sys-db-alias pma "randomstring"
108+
$BIN/v-change-sys-db-alias pma "$old"
109+
fi
110+
if [ -n "$DB_PGA_ALIAS" ]; then
111+
old=$DB_PMA_ALIAS
112+
$BIN/v-change-sys-db-alias pga "randomstring"
113+
$BIN/v-change-sys-db-alias pga "$old"
98114
fi
99115

100116
# Fix MySQL lc-messages-dir path for mariadb

0 commit comments

Comments
 (0)