Browse Source

fix/2021-chown-bash_alias

https://forum.hestiacp.com/t/bash-aliases-appart-to-root/2680/2
Jaap Marcus 5 years ago
parent
commit
69c2099e21
1 changed files with 3 additions and 2 deletions
  1. 3 2
      bin/v-change-user-php-cli

+ 3 - 2
bin/v-change-user-php-cli

@@ -48,9 +48,10 @@ if [ ! -f "$HESTIA_INSTALL_DIR/multiphp/$WEB_SYSTEM/PHP-${version//.}.sh" ]; the
     exit
 fi
 
-#create .bash_aliases is not exsists
+# Create .bash_aliases is not exsists
 if [ ! -f "$FILE" ]; then
-    touch "$FILE"
+    touch $FILE
+    chown $user:$user $FILE
 fi
 
 if grep -q "alias php='env php$version'" "$FILE"; then