summaryrefslogtreecommitdiffstats
path: root/core/setup
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-09-26 17:25:28 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-09-30 10:24:52 +0200
commitf788dffce8903a633c95b05b83c7a4ba9e8c7c16 (patch)
tree60bf5ba2e3bf3cae5bd31105b5564acfe12ed094 /core/setup
parentd102cb4ffacc8583c5b51297555c60e711e305bf (diff)
downloadnextcloud-server-f788dffce8903a633c95b05b83c7a4ba9e8c7c16.tar.gz
nextcloud-server-f788dffce8903a633c95b05b83c7a4ba9e8c7c16.zip
Try to create datadirectory to test whether the .htaccess works
Fixes https://github.com/owncloud/core/pull/11299#issuecomment-56968588 and also https://github.com/owncloud/core/issues/10628 together with https://github.com/owncloud/core/pull/11299#issuecomment-56968588 when backported.
Diffstat (limited to 'core/setup')
-rw-r--r--core/setup/controller.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/setup/controller.php b/core/setup/controller.php
index fca16ea27be..353271902e6 100644
--- a/core/setup/controller.php
+++ b/core/setup/controller.php
@@ -116,9 +116,14 @@ class Controller {
$errors = array();
- if (is_dir($datadir) and is_writable($datadir)) {
+ // Create data directory to test whether the .htaccess works
+ // Notice that this is not necessarily the same data directory as the one
+ // that will effectively be used.
+ @mkdir($datadir);
+ if (is_dir($datadir) && is_writable($datadir)) {
// Protect data directory here, so we can test if the protection is working
\OC_Setup::protectDataDirectory();
+
try {
$htaccessWorking = \OC_Util::isHtaccessWorking();
} catch (\OC\HintException $e) {