Bugfixes gestions des droits
This commit is contained in:
parent
7371bcd553
commit
c07d7fbac4
|
@ -419,9 +419,6 @@ class m_dom {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//on corrige les permissions
|
|
||||||
exec("sudo /usr/lib/alternc/fixperms.sh -u ".$cuid);
|
|
||||||
|
|
||||||
// Creation des 3 sous-domaines par défaut : Vide, www et mail
|
// Creation des 3 sous-domaines par défaut : Vide, www et mail
|
||||||
$this->set_sub_domain($domain, '', $this->type_url, 'http://www.'.$domain);
|
$this->set_sub_domain($domain, '', $this->type_url, 'http://www.'.$domain);
|
||||||
$this->set_sub_domain($domain, 'www', $this->type_local, '/'. $domshort);
|
$this->set_sub_domain($domain, 'www', $this->type_local, '/'. $domshort);
|
||||||
|
|
|
@ -180,9 +180,9 @@ class m_quota {
|
||||||
if (floatval($size)==0) $size="0";
|
if (floatval($size)==0) $size="0";
|
||||||
if (isset($this->disk[$ressource])) {
|
if (isset($this->disk[$ressource])) {
|
||||||
// It's a disk resource, update it with shell command
|
// It's a disk resource, update it with shell command
|
||||||
exec("/usr/lib/alternc/quota_edit $cuid $size");
|
exec("/usr/lib/alternc/quota_edit $cuid $size &> /dev/null &");
|
||||||
// Now we check that the value has been written properly :
|
// Now we check that the value has been written properly :
|
||||||
exec("usr/lib/alternc/quota_get $cuid",$a);
|
exec("/usr/lib/alternc/quota_get $cuid &> /dev/null &",$a);
|
||||||
if ($size!=$a[1]) {
|
if ($size!=$a[1]) {
|
||||||
$err->raise("quota",1);
|
$err->raise("quota",1);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -164,9 +164,6 @@ set_value database $database $MYSQL_MAIL_CONFIG
|
||||||
set_value user $alternc_mail_user $MYSQL_MAIL_CONFIG
|
set_value user $alternc_mail_user $MYSQL_MAIL_CONFIG
|
||||||
set_value password $alternc_mail_password $MYSQL_MAIL_CONFIG
|
set_value password $alternc_mail_password $MYSQL_MAIL_CONFIG
|
||||||
|
|
||||||
echo $SED_SCRIPT_MAIL
|
|
||||||
echo XXXXXX
|
|
||||||
echo $SED_SCRIPT_USR
|
|
||||||
|
|
||||||
# take extra precautions here with the mysql password:
|
# take extra precautions here with the mysql password:
|
||||||
# put the sed script in a temporary file
|
# put the sed script in a temporary file
|
||||||
|
@ -192,10 +189,9 @@ mysql_mail="/usr/bin/mysql --defaults-file=$MYSQL_MAIL_CONFIG"
|
||||||
|
|
||||||
echo "Checking for MySQL connectivity"
|
echo "Checking for MySQL connectivity"
|
||||||
$mysql -e "SHOW TABLES" >/dev/null && echo "MYSQL.SH OK!" || echo "MYSQL.SH FAILED: database user setup failed"
|
$mysql -e "SHOW TABLES" >/dev/null && echo "MYSQL.SH OK!" || echo "MYSQL.SH FAILED: database user setup failed"
|
||||||
echo $grant_mail
|
|
||||||
# Final mysql setup: db schema
|
# Final mysql setup: db schema
|
||||||
echo "installing AlternC schema in $database..."
|
echo "installing AlternC schema in $database..."
|
||||||
$mysql < /usr/share/alternc/install/mysql.sql || echo cannot load database schema
|
$mysql < /usr/share/alternc/install/mysql.sql || echo cannot load database schema
|
||||||
$mysql <<EOF
|
$mysql <<EOF
|
||||||
$grant_mail
|
$grant_mail
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -33,7 +33,7 @@ for my $p (@create_paths) {
|
||||||
mkdir($p);
|
mkdir($p);
|
||||||
chown($uid, $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- -m g:alterncpanel:rw- -m u:$uid:rw- -m g:$uid:rw- '$p'");
|
system("/usr/lib/alternc/fixperms.sh -u '$uid' ");
|
||||||
}
|
}
|
||||||
|
|
||||||
0;
|
0;
|
||||||
|
|
Loading…
Reference in New Issue