为什么我的codeigniter会更改权限

By using File Upload Class in codeigniter it uploads file sucessfully at folder /upload,(when not able to view images) found that all files are uploaded as permission 600 even follow a similar question

stackoverflow - similar question

Code :::

 <?php

public function update($id)
{
    $this->check_login();
    $this->load->model('admin_user');
    // File Upload  ///
    $config['upload_path'] = './uploads/';
    $config['allowed_types'] = 'gif|jpg|png';
    $config['overwrite'] = TRUE;
    $config['max_size'] = '100';
    $config['max_width'] = '1024';
    $config['max_height'] = '768';
    $this->load->library('upload', $config);
    //$this->upload->initialize($config);
    if(!$this->upload->do_upload('file')) {
    echo $this->upload->display_errors();
    } else {
    $file_name = $this->upload->data();
    }
// File Upload //

You can change permission of your file by using this before upload

$zdata = array('upload_data' => $this->upload->data()); // get data
$zfile = $zdata['upload_data']['full_path']; // get file path
chmod($zfile, 0777); // CHMOD file
 if(!$this->upload->do_upload('file')) { 
    echo $this->upload->display_errors();
    } else { 
    $file_name = $this->upload->data();
    }