diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index df5e7e7676..d3e965133c 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,11 @@ +2012-04-18 Dario Rodriguez + + * pandora_server_installer: Fixed a problem setting permissions + for /var/spool/pandora directory because an incorrect web server + group mathcing + + MERGED FROM 4.0.2 + 2012-04-17 Sergio Martin * util/pandora_db.pl: Fixed parameters gathering and diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 6080c80ba6..f1190e08b2 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -221,25 +221,29 @@ perl-TimeDate perl-XML-Simple perl-XML-Twig perl-libwww-perl mysql-client perl-S mkdir $PANDORA_LOG 2> /dev/null echo "Giving proper permission to /var/spool/pandora" - id -g www-data 2> /dev/null + IDGROUP=`id -g www-data 2> /dev/null` if [ $? -eq 0 ] then - chown -R pandora:www-data $PANDORA_SPOOL + GROUPNAME=`cat /etc/group | grep ":$IDGROUP:" | awk -F":" '{print $1}'` + chown -R pandora:$GROUPNAME $PANDORA_SPOOL else - id -g wwwrun 2> /dev/null + IDGROUP=`id -g wwwrun 2> /dev/null` if [ $? -eq 0 ] then - chown -R pandora:wwwrun $PANDORA_SPOOL + GROUPNAME=`cat /etc/group | grep ":$IDGROUP:" | awk -F":" '{print $1}'` + chown -R pandora:$GROUPNAME $PANDORA_SPOOL else - id -g www 2> /dev/null + IDGROUP=`id -g www 2> /dev/null` if [ $? -eq 0 ] then - chown -R pandora:www $PANDORA_SPOOL + GROUPNAME=`cat /etc/group | grep ":$IDGROUP:" | awk -F":" '{print $1}'` + chown -R pandora:$GROUPNAME $PANDORA_SPOOL else - id -g apache 2> /dev/null + IDGROUP=`id -g apache 2> /dev/null` if [ $? -eq 0 ] then - chown -R pandora:apache $PANDORA_SPOOL + GROUPNAME=`cat /etc/group | grep ":$IDGROUP:" | awk -F":" '{print $1}'` + chown -R pandora:$GROUPNAME $PANDORA_SPOOL else echo "No web server user found, some functionality might not perform correctly" chown -R pandora:root $PANDORA_SPOOL