diff options
author | Brice Maron <brice@bmaron.net> | 2012-06-14 21:16:59 +0000 |
---|---|---|
committer | Brice Maron <brice@bmaron.net> | 2012-06-14 21:16:59 +0000 |
commit | 4753cc3ebde9867ab4deb1979fb4231b0c847426 (patch) | |
tree | c6944e947bc84c8716b57b7e2b06ef51efccb3db /lib/config.php | |
parent | 6da5a2fdd4e8a19ab993b4a1f7de7e45b8922a16 (diff) | |
parent | f3b30e4658c4dde82b56b458c672fa5edcba5d6b (diff) | |
download | nextcloud-server-4753cc3ebde9867ab4deb1979fb4231b0c847426.tar.gz nextcloud-server-4753cc3ebde9867ab4deb1979fb4231b0c847426.zip |
Merge branch 'master' into multi_app_dir
Conflicts:
apps/bookmarks/ajax/addBookmark.php
config/config.sample.php
lib/app.php
remote.php
Diffstat (limited to 'lib/config.php')
-rw-r--r-- | lib/config.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/config.php b/lib/config.php index e3a9c11f247..9279549b1bb 100644 --- a/lib/config.php +++ b/lib/config.php @@ -170,14 +170,18 @@ class OC_Config{ } $content .= ");\n?>\n"; + $filename = OC::$SERVERROOT."/config/config.php"; // Write the file - $result=@file_put_contents( OC::$SERVERROOT."/config/config.php", $content ); + $result=@file_put_contents( $filename, $content ); if(!$result) { $tmpl = new OC_Template( '', 'error', 'guest' ); $tmpl->assign('errors',array(1=>array('error'=>"Can't write into config directory 'config'",'hint'=>"You can usually fix this by giving the webserver user write access to the config directory in owncloud"))); $tmpl->printPage(); exit; } + // Prevent others not to read the config + @chmod($filename, 0640); + return true; } } |