On continue mpm-itk

This commit is contained in:
Alan Garcia 2011-05-22 17:23:59 +00:00
parent 5b691210d0
commit 0a0f5bc77a
7 changed files with 23 additions and 28 deletions

View File

@ -318,12 +318,12 @@ class m_admin {
}
if (!$force) {
if ($mail=="") {
$err->raise("admin",6);
return false;
$err->raise("admin",6);
return false;
}
if (checkmail($mail)!=0){
$err->raise("admin",5);
return false;
$err->raise("admin",5);
return false;
}
}
// Vérification de la conformité du login

View File

@ -103,7 +103,7 @@ SQLBACKUP_OVERWRITE=""
ALTERNC_SLAVES=""
EOF
chown root:www-data $CONFIGFILE
chown root:alterncpanel $CONFIGFILE
chmod 640 $CONFIGFILE
fi

View File

@ -6,7 +6,7 @@ set -e
# Create AlternC Panel user for web server
addgroup --system --gid 1999 alterncpanel
adduser --system --home "$ALTERNC_LOC/bureau" --no-create-home \
adduser --system --home "/etc/alternc/.alterncpanel" \
--disabled-password --uid 1999 --ingroup alterncpanel alterncpanel
case "$1" in
@ -14,6 +14,13 @@ case "$1" in
;;
upgrade)
# Set correct rights on files
echo "/!\ Warning /!\ Defaults ACL will be applied"
echo "If error, please remount $ALTERNC_LOC with ACL"
echo "and re-run /usr/lib/alternc/fixperms.sh "
/usr/lib/alternc/fixperms.sh
if dpkg --compare-versions "$2" lt "0.9.4"; then
echo "Upgrading bind configuration"
# Move /etc/bind files around

2
debian/rules vendored
View File

@ -54,7 +54,7 @@ install: build
# Fix permisions
chmod 755 debian/alternc/etc/alternc
chmod 644 debian/alternc/etc/alternc/phpmyadmin.inc.php
chown -R root:www-data debian/alternc/var/alternc/bureau
chown -R alterncpanel:alterncpanel debian/alternc/var/alternc/bureau
chmod 1733 debian/alternc/var/alternc/sessions
chmod -R 644 debian/alternc/var/alternc/bureau
chmod -R a+X debian/alternc/var/alternc/bureau

View File

@ -320,24 +320,13 @@ done
# Last touches
#
# Changing owner of web panel's files
chown -R alterncpanel:alterncpanel "$ALTERNC_LOC/bureau"
# Set correct rights on files
echo "/!\ Warning /!\ Defaults ACL will be applied"
echo "If error, please remount $ALTERNC_LOC with ACL"
echo "and re-run /usr/lib/alternc/fixperms.sh "
echo "<press enter to continue>"
read
/usr/lib/alternc/fixperms.sh
# Creating admin user if needed
HAS_ROOT=`mysql --defaults-file=/etc/alternc/my.cnf -e "SELECT COUNT(*) FROM membres WHERE login = 'admin' OR login = 'root' and su = 1" | tail -1`
if [ "$HAS_ROOT" != "1" ]; then
echo "Creating admin user..."
echo ""
if su - www-data -c /usr/share/alternc/install/newone.php
if su - alterncpanel -c /usr/share/alternc/install/newone.php
then
echo "*******************************************"
echo "* *"
@ -354,10 +343,11 @@ if [ "$HAS_ROOT" != "1" ]; then
fi
fi
# Changing owner of web panel's files
chown -R alterncpanel:alterncpanel "$ALTERNC_LOC/bureau"
# We force the re-computing of the DNS zones, since we may have changed the IP address (see #460)
MYSQL_CONFIG="/etc/alternc/my.cnf"
mysql="/usr/bin/mysql --defaults-file=$MYSQL_CONFIG"
$mysql -B -e "update domaines set dns_action='update';"
/usr/bin/mysql --defaults-file="/etc/alternc/my.cnf" -B -e "update domaines set dns_action='update';"
# We should restart apaches after all configuration stuff ...
for service in $SERVICES; do

View File

@ -61,11 +61,8 @@ doone() {
chmod 2770 -R "$REP"
# Delete existings ACL
find $REP -exec setfacl -bk '{}' \;
# Set the defaults acl on directory
find $REP -type d -exec setfacl -m d:g:alterncpanel:rw- '{}' \;
# Set the acl on all the files
find $REP -exec setfacl -m g:alterncpanel:rw- '{}' \;
# Set the defaults acl on all the files
setfacl -b -k -m d:g:alterncpanel:rw- -R "$REP" \;
read GID LOGIN
done

View File

@ -31,8 +31,9 @@ my @create_paths = ($PTH);
for my $p (@create_paths) {
mkdir($p);
chown(33, $uid, $p);
chown($uid, $uid, $p);
system("/bin/chmod 02770 '$p'");
system("/usr/bin/setfacl -m d:g:alterncpanel:rw- -m d:u:$uid:rw- -m d:g:$uid:rw- '$p'");
}
0;