From b5c24e997abbbc6a0cd6b8d65fe70f550e8d273f Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 25 Sep 2013 19:37:45 +0200 Subject: 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 --- application/controllers/file.php | 2 -- 1 file changed, 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; } -- cgit v1.2.3-24-g4f1b