Bugfixes gestions des droits

This commit is contained in:
Steven Mondji-Lerider 2012-06-26 08:08:49 +00:00
parent 7371bcd553
commit c07d7fbac4
4 changed files with 4 additions and 11 deletions

View File

@ -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
$this->set_sub_domain($domain, '', $this->type_url, 'http://www.'.$domain);
$this->set_sub_domain($domain, 'www', $this->type_local, '/'. $domshort);

View File

@ -180,9 +180,9 @@ class m_quota {
if (floatval($size)==0) $size="0";
if (isset($this->disk[$ressource])) {
// 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 :
exec("usr/lib/alternc/quota_get $cuid",$a);
exec("/usr/lib/alternc/quota_get $cuid &> /dev/null &",$a);
if ($size!=$a[1]) {
$err->raise("quota",1);
return false;

View File

@ -164,9 +164,6 @@ set_value database $database $MYSQL_MAIL_CONFIG
set_value user $alternc_mail_user $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:
# 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"
$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
echo "installing AlternC schema in $database..."
$mysql < /usr/share/alternc/install/mysql.sql || echo cannot load database schema
$mysql <<EOF
$grant_mail
$grant_mail
EOF

View File

@ -33,7 +33,7 @@ for my $p (@create_paths) {
mkdir($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- -m g:alterncpanel:rw- -m u:$uid:rw- -m g:$uid:rw- '$p'");
system("/usr/lib/alternc/fixperms.sh -u '$uid' ");
}
0;