On continue mpm-itk
This commit is contained in:
parent
5b691210d0
commit
0a0f5bc77a
|
@ -318,12 +318,12 @@ class m_admin {
|
||||||
}
|
}
|
||||||
if (!$force) {
|
if (!$force) {
|
||||||
if ($mail=="") {
|
if ($mail=="") {
|
||||||
$err->raise("admin",6);
|
$err->raise("admin",6);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (checkmail($mail)!=0){
|
if (checkmail($mail)!=0){
|
||||||
$err->raise("admin",5);
|
$err->raise("admin",5);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Vérification de la conformité du login
|
// Vérification de la conformité du login
|
||||||
|
|
|
@ -103,7 +103,7 @@ SQLBACKUP_OVERWRITE=""
|
||||||
ALTERNC_SLAVES=""
|
ALTERNC_SLAVES=""
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
chown root:www-data $CONFIGFILE
|
chown root:alterncpanel $CONFIGFILE
|
||||||
chmod 640 $CONFIGFILE
|
chmod 640 $CONFIGFILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ set -e
|
||||||
|
|
||||||
# Create AlternC Panel user for web server
|
# Create AlternC Panel user for web server
|
||||||
addgroup --system --gid 1999 alterncpanel
|
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
|
--disabled-password --uid 1999 --ingroup alterncpanel alterncpanel
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
@ -14,6 +14,13 @@ case "$1" in
|
||||||
;;
|
;;
|
||||||
|
|
||||||
upgrade)
|
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
|
if dpkg --compare-versions "$2" lt "0.9.4"; then
|
||||||
echo "Upgrading bind configuration"
|
echo "Upgrading bind configuration"
|
||||||
# Move /etc/bind files around
|
# Move /etc/bind files around
|
||||||
|
|
|
@ -54,7 +54,7 @@ install: build
|
||||||
# Fix permisions
|
# Fix permisions
|
||||||
chmod 755 debian/alternc/etc/alternc
|
chmod 755 debian/alternc/etc/alternc
|
||||||
chmod 644 debian/alternc/etc/alternc/phpmyadmin.inc.php
|
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 1733 debian/alternc/var/alternc/sessions
|
||||||
chmod -R 644 debian/alternc/var/alternc/bureau
|
chmod -R 644 debian/alternc/var/alternc/bureau
|
||||||
chmod -R a+X debian/alternc/var/alternc/bureau
|
chmod -R a+X debian/alternc/var/alternc/bureau
|
||||||
|
|
|
@ -320,24 +320,13 @@ done
|
||||||
# Last touches
|
# 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
|
# 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`
|
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
|
if [ "$HAS_ROOT" != "1" ]; then
|
||||||
echo "Creating admin user..."
|
echo "Creating admin user..."
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if su - www-data -c /usr/share/alternc/install/newone.php
|
if su - alterncpanel -c /usr/share/alternc/install/newone.php
|
||||||
then
|
then
|
||||||
echo "*******************************************"
|
echo "*******************************************"
|
||||||
echo "* *"
|
echo "* *"
|
||||||
|
@ -354,10 +343,11 @@ if [ "$HAS_ROOT" != "1" ]; then
|
||||||
fi
|
fi
|
||||||
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)
|
# 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"
|
/usr/bin/mysql --defaults-file="/etc/alternc/my.cnf" -B -e "update domaines set dns_action='update';"
|
||||||
mysql="/usr/bin/mysql --defaults-file=$MYSQL_CONFIG"
|
|
||||||
$mysql -B -e "update domaines set dns_action='update';"
|
|
||||||
|
|
||||||
# We should restart apaches after all configuration stuff ...
|
# We should restart apaches after all configuration stuff ...
|
||||||
for service in $SERVICES; do
|
for service in $SERVICES; do
|
||||||
|
|
|
@ -61,11 +61,8 @@ doone() {
|
||||||
chmod 2770 -R "$REP"
|
chmod 2770 -R "$REP"
|
||||||
|
|
||||||
# Delete existings ACL
|
# Delete existings ACL
|
||||||
find $REP -exec setfacl -bk '{}' \;
|
# Set the defaults acl on all the files
|
||||||
# Set the defaults acl on directory
|
setfacl -b -k -m d:g:alterncpanel:rw- -R "$REP" \;
|
||||||
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- '{}' \;
|
|
||||||
|
|
||||||
read GID LOGIN
|
read GID LOGIN
|
||||||
done
|
done
|
||||||
|
|
|
@ -31,8 +31,9 @@ my @create_paths = ($PTH);
|
||||||
|
|
||||||
for my $p (@create_paths) {
|
for my $p (@create_paths) {
|
||||||
mkdir($p);
|
mkdir($p);
|
||||||
chown(33, $uid, $p);
|
chown($uid, $uid, $p);
|
||||||
system("/bin/chmod 02770 '$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;
|
0;
|
||||||
|
|
Loading…
Reference in New Issue