Ajout d'un répertoire tmp par vhosts pour éviter les problèmes d'ACL pendant les uploads

This commit is contained in:
Steven Mondji-Lerider 2012-06-12 17:05:51 +00:00
parent 69e61fa096
commit ad874e6232
3 changed files with 10 additions and 2 deletions

View File

@ -408,7 +408,14 @@ class m_dom {
if (! is_dir($dest_root . "/". $domshort)) {
mkdir($dest_root . "/". $domshort);
}
if (! is_dir($dest_root . "/tmp")) {
mkdir($dest_root . "/tmp");
}
//on corrige les permissions
exec("sudo /usr/lib/alternc/fixperms.sh -u ".$uid);
// 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

@ -5,6 +5,7 @@
<Directory "%%document_root%%">
php_admin_value open_basedir "%%account_root%%:/usr/share/php/:/var/alternc/tmp:/tmp"
php_admin_value upload_tmp_dir %%document_root%%/tmp
Options +MultiViews -FollowSymLinks +SymLinksIfOwnerMatch
AllowOverride AuthConfig FileInfo Limit Options Indexes
</Directory>

View File

@ -59,7 +59,7 @@ host_create() {
local U_ID=$(get_uid_by_name "$USER")
local G_ID=$(get_uid_by_name "$USER")
local user_letter=`print_user_letter "$USER"`
local DOCUMENT_ROOT="${HTML_HOME}/${user_letter}/${USER}/$TARGET_DIR"
local DOCUMENT_ROOT="${HTML_HOME}/${user_letter}/${USER}$TARGET_DIR"
local ACCOUNT_ROOT="${HTML_HOME}/${user_letter}/${USER}/"
local FILE_TARGET="$VHOST_DIR/${user_letter}/$USER/$FQDN.conf"