diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-10-30 20:57:19 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-10-30 20:57:19 +0100 |
commit | 6d097529405a7e7791b4daac1909bafd38445c5c (patch) | |
tree | e8123b428f5b8bb1b14a42a0397de8e7dc4ff98c /lib/setup.php | |
parent | 246d7ea2ea849b115c0d6eb47e6ea725c6271d0a (diff) | |
download | nextcloud-server-6d097529405a7e7791b4daac1909bafd38445c5c.tar.gz nextcloud-server-6d097529405a7e7791b4daac1909bafd38445c5c.zip |
DRY for creating htaccess to protect data-directory
Diffstat (limited to 'lib/setup.php')
-rw-r--r-- | lib/setup.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/setup.php b/lib/setup.php index 579a1b523ce..1d3fbd1c8ea 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -559,6 +559,10 @@ class OC_Setup { $content.= "Options -Indexes\n"; @file_put_contents(OC::$SERVERROOT.'/.htaccess', $content); //supress errors in case we don't have permissions for it + self::protectDataDirectory(); + } + + public static function protectDataDirectory() { $content = "deny from all\n"; $content.= "IndexIgnore *"; file_put_contents(OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data').'/.htaccess', $content); |