From 41f73d242827bd99e726de19d9d02200225b1fd9 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Mon, 5 Dec 2016 14:43:40 +0100 Subject: [PATCH] User permission --- lamp-xenial64-fpm/bootstrap.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lamp-xenial64-fpm/bootstrap.sh b/lamp-xenial64-fpm/bootstrap.sh index f0525e6..85f93a5 100644 --- a/lamp-xenial64-fpm/bootstrap.sh +++ b/lamp-xenial64-fpm/bootstrap.sh @@ -1,12 +1,13 @@ #!/usr/bin/env bash +echo 'ubuntu:scores' | sudo chpasswd + VARGANTDEV=1 DIR=/vagrant DIRDATA=$DIR/data MYSQL_PASS=scores MARIADB_VERSION="10.1" PHPMYADMIN_VERSION="4.6.3" -USER=$(whoami) # --- Add a file action.upgrade to perfom a system upgrade if [ -f $DIR/action.upgrade ]; then @@ -86,8 +87,10 @@ if [ ! -f /usr/bin/php ]; then sudo sed -i -e 's/;opcache.enable=0/opcache.enable=1/g' /etc/php/7.0/fpm/php.ini sudo cp -f $DIRDATA/PHP/xdebug.ini /etc/php/7.0/mods-available/xdebug.ini # Pool user - sudo sed -i -e "s/user = www-data/user = $USER/g" /etc/php/7.0/fpm/pool.d/www.conf - sudo sed -i -e 's/group = www-data/group = "$(whoami)"/g' /etc/php/7.0/fpm/pool.d/www.conf + sudo sed -i -e 's/listen.owner = www-data/listen.owner = ubuntu/g' /etc/php/7.0/fpm/pool.d/www.conf + sudo sed -i -e 's/listen.group = www-data/listen.group = ubuntu/g' /etc/php/7.0/fpm/pool.d/www.conf + sudo sed -i -e 's/user = www-data/user = ubuntu/g' /etc/php/7.0/fpm/pool.d/www.conf + sudo sed -i -e 's/group = www-data/group = ubuntu/g' /etc/php/7.0/fpm/pool.d/www.conf # --- Browscap sudo cp -f $DIRDATA/PHP/php_browscap.ini /etc/php/7.0/fpm/ sudo sed -i -e 's/;browscap = extra\/browscap.ini/browscap = \/etc\/php\/7.0\/fpm\/php_browscap.ini/g' /etc/php/7.0/fpm/php.ini