]> source.dussan.org Git - nextcloud-server.git/commitdiff
Try to create datadirectory to test whether the .htaccess works
authorLukas Reschke <lukas@owncloud.com>
Fri, 26 Sep 2014 15:25:28 +0000 (17:25 +0200)
committerLukas Reschke <lukas@owncloud.com>
Fri, 26 Sep 2014 15:25:28 +0000 (17:25 +0200)
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.

core/setup/controller.php

index 15679e339765f459ae8a344ee4b5432e5a34814b..53f247e9769c6ba8a2809110dba98ac72f871544 100644 (file)
@@ -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) {