summaryrefslogtreecommitdiffstats
path: root/application/controllers
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-09-25 19:37:45 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-09-25 19:37:45 +0200
commitb5c24e997abbbc6a0cd6b8d65fe70f550e8d273f (patch)
tree41663419d68796580ac96c6f116837b0af0b8df7 /application/controllers
parent1f7915a7014345386752de09a23d5c0fc6532d75 (diff)
Remove chmod on uploaded files
It interferes with multiuser setups if you use X-Sendfile and it isn't really needed anyway because you can set an upload_path outside the docroot and because the default path is protected by an .htaccess file. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers')
-rw-r--r--application/controllers/file.php2
1 files changed, 0 insertions, 2 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php
index 6ac0bc28c..f6891c4bf 100644
--- a/application/controllers/file.php
+++ b/application/controllers/file.php
@@ -610,7 +610,6 @@ class File extends MY_Controller {
$file = $this->mfile->file($hash);
file_put_contents($file, $content);
- chmod($file, 0600);
$this->mfile->add_file($hash, $id, $filename);
$this->_show_url(array($id), false);
}
@@ -692,7 +691,6 @@ class File extends MY_Controller {
$file_path = $this->mfile->file($hash);
move_uploaded_file($file['tmp_name'], $file_path);
- chmod($file_path, 0600);
$this->mfile->add_file($hash, $id, $filename);
$ids[] = $id;
}