title: File permission with upload class of CodeIgniter
body: <p>Hi I need to put a permission  777 to my uploaded files but I dont find any docs for uploaded files in codeigniter... Is it possible to put permission 777 with the upload class of codeigniter  ??</p>
  
  <p>$group_id = $this->input->post('group_id', TRUE);</p>
  
  <pre><code>   // unlink('static/images/uploads/44');
    // rmdir('static/images/uploads/45');
  
      $dir = is_dir('../www/static/images/uploads/'.$group_id);
      if($dir){
              $config['upload_path'] = '../www/static/images/uploads/'.$group_id;
              echo "test";
      }
  
      else{
          mkdir('../www/static/images/uploads/'.$group_id, 0777);
          $config['upload_path'] = '../www/static/images/uploads/'.$group_id;
      }
  
  
      $config['allowed_types']     = 'docx|pdf|doc|gif|jpg|png|tiff';
      $config['max_size'] = '10000000';
      $config['max_width']  = '999999';
      $config['max_height']  = '99999';
      $this-&gt;load-&gt;model('Teacher_model');
  
  
  
      $this-&gt;load-&gt;library('upload', $config);
  
      if ( ! $this-&gt;upload-&gt;do_upload())
      {
          $error = array('error' =&gt; $this-&gt;upload-&gt;display_errors());
  
         print_r($error);
  
          //$this-&gt;load-&gt;view('school/teacher/upload_form', $error);
      }
      else
      {
          $data = array('upload_data' =&gt; $this-&gt;upload-&gt;data());
  
  
  
              $name = $this-&gt;input-&gt;post('name', TRUE);
              $path = $data['upload_data']['file_name'];
              $group_id = $this-&gt;input-&gt;post('group_id', TRUE);
  
              $this-&gt;Teacher_model-&gt;add_ressources($group_id,$name,$path);
  
  
           redirect('school/teachers/#tabs_group_ressource'.$group_id, 'location', 301);
      }
  </code></pre>