From db4360cc4835d20248943c47ba9309af5c1843e3 Mon Sep 17 00:00:00 2001 From: darode Date: Wed, 18 Apr 2012 09:21:28 +0000 Subject: [PATCH] 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 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6007 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 8 ++++++++ pandora_server/pandora_server_installer | 20 ++++++++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) 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