Oui merci pour les réponses,
voila plus ou moins le script que j’ai lancé depuis une autre machine, dans un autre shell, en ssh :
[EDIT]: j’avais ajouté des “echo” mais le script coupable du plantage n’avait pas ces “echo Running”
[code]# ##############################
DATAS SETUP
FIND=$(which find)
APACHE_CONFIG=$($FIND /etc/apache2 -name “envvars”)
source $APACHE_CONFIG
echo “Apache user = $APACHE_RUN_USER”
[[ -z $APACHE_RUN_USER ]] && APACHE_RUN_USER=“www-data” && APACHE_RUN_GROUP=$APACHE_RUN_USER
INIT
HOME_DIR=$1
[[ -z $1 ]] && HOME_DIR=$(find / -type d “www” | egrep -v “src|usr|var” | head -n 1)
[[ -z $HOME_DIR ]] && echo “ERR: no home dir found” && exit 1
DEBUG=1
phpBB3
echo "# ########################"
echo "# phpBB3 forum set up"
echo “# ########################”
#BASEDIR=/home/www/mondomain/phpBB3
BASEDIR=$(find $HOME_DIR -type d -name “phpBB3” | head -n 1)
SPECIALDIR=“files cache store upload”
Files ownership
echo "chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $BASEDIR"
chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $BASEDIR
All files at 644
ACCESS="644"
echo "chmoding all files $ACCESS …"
chmod -R $ACCESS $BASEDIR/*
Configuration file
ACCESS="640"
echo “chmoding config file $ACCESS …”
$FIND $BASEDIR -type f -name “config.php” -exec chmod $ACCESS {} ;
Directories
ACCESS="755"
echo “chmoding all directories $ACCESS…”
$FIND $BASEDIR -type d -exec chmod 755 {} ;
ACCESS="777"
for dir in $SPECIALDIR
do
echo “chmoding $dir $ACCESS…”
$FIND $BASEDIR -type d -name $dir -exec chmod $ACCESS {} ;
done
echo “chmoding done”
PMA
echo "# ########################"
echo "# PMA"
echo “# ########################”
BASEDIR=/usr/local
CFGFILE=“config.inc.php”
Configuration file
echo “chmoding config files 640 …”
$FIND $BASEDIR -type f -name $CFGFILE -exec chmod o-rw {} ;
echo “chmoding done”[/code]