Skip to content

Commit 1172b30

Browse files
committed
Adjust permissions pma sso
1 parent 2c05926 commit 1172b30

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

bin/v-add-sys-pma-sso

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,13 @@ apikey=$($BIN/v-generate-api-key);
7575

7676
# copy config dir to /usr/share/phpmyadmin/
7777
cp -f $HESTIA_INSTALL_DIR/phpmyadmin/hestia-sso.php $PMA_INSTALL/hestia-sso.php
78-
chmod 644 $PMA_INSTALL/hestia-sso.php
78+
chmod 640 $PMA_INSTALL/hestia-sso.php
7979

8080
sed -i "s/%PHPMYADMIN_KEY%/$phpmyadminkey/g" $PMA_INSTALL/hestia-sso.php
8181
sed -i "s/%API_KEY%/$apikey/g" $PMA_INSTALL/hestia-sso.php
8282
sed -i "s/%API_HOST_NAME%/$(hostname)/g" $PMA_INSTALL/hestia-sso.php
8383
sed -i "s/%API_HESTIA_PORT%/$BACKEND_PORT/g" $PMA_INSTALL/hestia-sso.php
8484

85-
8685
# Check if config already contains the keys
8786
touch $PMA_CONFIG/hestia-sso.inc.php
8887
chmod 640 $PMA_CONFIG/hestia-sso.inc.php

install/upgrade/manual/migrate_phpmyadmin.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ then
5252
mkdir -p /etc/phpmyadmin
5353
mkdir -p /etc/phpmyadmin/conf.d/
5454
mkdir /usr/share/phpmyadmin/tmp
55-
chmod 777 /usr/share/phpmyadmin/tmp/
55+
chmod 770 /usr/share/phpmyadmin/tmp/
5656
mkdir -p /etc/phpmyadmin/conf.d/
5757

5858
# Configuring Apache2 for PHPMYADMIN
@@ -76,7 +76,7 @@ then
7676
# Create copy of config file
7777
cp -f $HESTIA_INSTALL_DIR/phpmyadmin/config.inc.php /etc/phpmyadmin/
7878
mkdir -p /var/lib/phpmyadmin/tmp
79-
chmod 777 -R /var/lib/phpmyadmin/tmp
79+
chmod 770 -R /var/lib/phpmyadmin/tmp
8080

8181
# Set config and log directory
8282
sed -i "s|define('CONFIG_DIR', ROOT_PATH);|define('CONFIG_DIR', '/etc/phpmyadmin/');|" /usr/share/phpmyadmin/libraries/vendor_config.php

0 commit comments

Comments
 (0)