From ad874e62323405dd4b5b64a6ded50089d5681154 Mon Sep 17 00:00:00 2001 From: Steven Mondji-Lerider Date: Tue, 12 Jun 2012 17:05:51 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20d'un=20r=C3=A9pertoire=20tmp=20par=20vh?= =?UTF-8?q?osts=20pour=20=C3=A9viter=20les=20probl=C3=A8mes=20d'ACL=20pend?= =?UTF-8?q?ant=20les=20uploads?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bureau/class/m_dom.php | 9 ++++++++- etc/alternc/templates/apache2/vhost.conf | 1 + src/functions_hosting.sh | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bureau/class/m_dom.php b/bureau/class/m_dom.php index 87f9b809..2b5d2c31 100644 --- a/bureau/class/m_dom.php +++ b/bureau/class/m_dom.php @@ -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); diff --git a/etc/alternc/templates/apache2/vhost.conf b/etc/alternc/templates/apache2/vhost.conf index 1e26e49e..2be756c0 100644 --- a/etc/alternc/templates/apache2/vhost.conf +++ b/etc/alternc/templates/apache2/vhost.conf @@ -5,6 +5,7 @@ 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 diff --git a/src/functions_hosting.sh b/src/functions_hosting.sh index 1671a683..4968618a 100644 --- a/src/functions_hosting.sh +++ b/src/functions_hosting.sh @@ -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"