diff --git a/lib/setuplib.php b/lib/setuplib.php index f0bfc1d56ac..63ddebb48a6 100644 --- a/lib/setuplib.php +++ b/lib/setuplib.php @@ -55,6 +55,10 @@ function make_upload_directory($directory, $shownotices=true) { } return false; } + } + + // Make sure a .htaccess file is here, JUST IN CASE the files area is in the open + if (!file_exists($currdir.'/.htaccess')) { if ($handle = fopen($currdir.'/.htaccess', 'w')) { // For safety @fwrite($handle, "deny from all\r\n"); @fclose($handle);