From 77718880357c4fb507951bd8d5436091a58090da Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Mon, 2 Sep 2013 13:03:14 +0530 Subject: [PATCH] Give Webroot Ownership To PHP User --- usr/local/sbin/easyengine | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr/local/sbin/easyengine b/usr/local/sbin/easyengine index 6fd15eda..7967d1ce 100755 --- a/usr/local/sbin/easyengine +++ b/usr/local/sbin/easyengine @@ -444,10 +444,10 @@ MYSQLINFO() || OwnError "Unable To Create $WPDBNAME Database" } -NGINXUSERINFO() +PHPUSERINFO() { # Nginx User - NGINXUSER=$(grep ^user /etc/nginx/nginx.conf | cut -d' ' -f2 | cut -d';' -f1) \ + PHPUSER=$(grep ^user /etc/php5/fpm/pool.d/www.conf | cut -d'=' -f2 | cut -d' ' -f2) \ || OwnError "Unable To Findout Nginx Username" } @@ -605,12 +605,12 @@ EEWPDBSETUP() EEPERMISSION() { - # Call NGINXUSERINFO Function For NGINX User Details - NGINXUSERINFO + # Call PHPUSERINFO Function For NGINX User Details + PHPUSERINFO # Change Ownership echo -e "\033[34m Changing Ownership \e[0m" - chown -R $NGINXUSER:$NGINXUSER /var/www/$DOMAIN/ || OwnError "Unable To Change Ownership For $DOMAIN" + chown -R $PHPUSER:$PHPUSER /var/www/$DOMAIN/ || OwnError "Unable To Change Ownership For $DOMAIN" # Reload Nginx Configuration NGINXRELOAD