Просмотр исходного кода

Fix permisions

As in debian and centos fix issue whit exposed passwords
Maksim Usmanov | Maks 9 лет назад
Родитель
Сommit
e14eb2e23e
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      install/vst-install-ubuntu.sh

+ 4 - 1
install/vst-install-ubuntu.sh

@@ -1113,6 +1113,8 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
     fi
     wget $vestacp/roundcube/main.inc.php -O /etc/roundcube/main.inc.php
     wget $vestacp/roundcube/db.inc.php -O /etc/roundcube/db.inc.php
+    chmod 640 /etc/roundcube/debian-db-roundcube.php
+    chown root:www-data /etc/roundcube/debian-db-roundcube.php
     wget $vestacp/roundcube/vesta.php -O \
         /usr/share/roundcube/plugins/password/drivers/vesta.php
     wget $vestacp/roundcube/config.inc.php -O \
@@ -1121,10 +1123,11 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
     mysql -e "CREATE DATABASE roundcube"
     mysql -e "GRANT ALL ON roundcube.* TO roundcube@localhost IDENTIFIED BY '$r'"
     sed -i "s/%password%/$r/g" /etc/roundcube/db.inc.php
-
     if [ "$release" = '16.04' ]; then
         mv /etc/roundcube/db.inc.php /etc/roundcube/debian-db-roundcube.php
         mv /etc/roundcube/main.inc.php /etc/roundcube/config.inc.php
+        chmod 640 /etc/roundcube/debian-db-roundcube.php
+        chown root:www-data /etc/roundcube/debian-db-roundcube.php
     fi
 
     mysql roundcube < /usr/share/dbconfig-common/data/roundcube/install/mysql