Sfoglia il codice sorgente

Fix for Trac #289: setup now checks that the "setup" directory is writeable.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@909 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 14 anni fa
parent
commit
4c1be20675
1 ha cambiato i file con 9 aggiunte e 0 eliminazioni
  1. 9 0
      setup/index.php

+ 9 - 0
setup/index.php

@@ -1179,6 +1179,15 @@ else
 		$oP->output();
 		exit;
 	}
+	if (!is_writable(dirname(FINAL_CONFIG_FILE).'/setup'))
+	{
+		$oP->add("<h1>iTop configuration wizard</h1>\n");
+		$oP->add("<h2>Fatal error</h2>\n");
+		$oP->error("<b>Error:</b> the directory where to store temporary setup files is not writable.");
+		$oP->p("The wizard cannot create operate. Please make sure that the directory '<b>".realpath(dirname(FINAL_CONFIG_FILE))."/setup</b>' is writable for the web server.");
+		$oP->output();
+		exit;
+	}
 	
 }
 try