Browse Source

Give Webroot Ownership To PHP User

old-stable
Mitesh Shah 12 years ago
parent
commit
7771888035
  1. 10
      usr/local/sbin/easyengine

10
usr/local/sbin/easyengine

@ -444,10 +444,10 @@ MYSQLINFO()
|| OwnError "Unable To Create $WPDBNAME Database" || OwnError "Unable To Create $WPDBNAME Database"
} }
NGINXUSERINFO() PHPUSERINFO()
{ {
# Nginx User # 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" || OwnError "Unable To Findout Nginx Username"
} }
@ -605,12 +605,12 @@ EEWPDBSETUP()
EEPERMISSION() EEPERMISSION()
{ {
# Call NGINXUSERINFO Function For NGINX User Details # Call PHPUSERINFO Function For NGINX User Details
NGINXUSERINFO PHPUSERINFO
# Change Ownership # Change Ownership
echo -e "\033[34m Changing Ownership \e[0m" 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 # Reload Nginx Configuration
NGINXRELOAD NGINXRELOAD

Loading…
Cancel
Save