title: how to solve: UPLOAD_ERR_CANT_write Value: 7,failed to write file to disk
body: <p>I have a php uploader as below</p>
  
  <pre><code>&lt;form enctype="multipart/form-data" action="jsonlog.php" method="POST"&gt;
      &lt;!-- MAX_FILE_SIZE must precede the file input field --&gt;
      &lt;input type="hidden" name="MAX_FILE_SIZE" value="30000" /&gt;
      &lt;!-- Name of input element determines name in $_FILES array --&gt;
      Send this file: &lt;input name="file" type="file" /&gt;
      &lt;input type="submit" value="Send File" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>In the jsonlog.php:</p>
  
  <pre><code>if($_FILES['file']['error']&gt;0)
  {
      echo "Reading Error: " . $_FILES['file']["error"] . "&lt;br /&gt;";
  }
  else
  {
    code to process
  }
  </code></pre>
  
  <p>It passed on my localhost, but when I tried on a linux server, it always gave me error:</p>
  
  <p>UPLOAD_ERR_CANT_write Value: 7,failed to write file to disk. Anyone knows how to solve it? </p>
  
  <p>Thanks</p>
  
  <hr>
  
  <p>Yes, I checked the tmp directory permission, see below</p>
  
  <pre><code>drwxrwxrwx   2 bitnami bitnami  4096 2011-09-21 13:34 tmp
  </code></pre>
  
  <p>I can created a new file in the tmp using command like</p>
  
  <pre><code>sudo vi test.txt
  </code></pre>
  
  <p>the uploader still returns the error PLOAD_ERR_CANT_write.</p>
  
  <p>There is one more thing that I don't understand: I log in as bitnami, I should have full control to the folder tmp, but I cannot write files into tmp using command without sudo</p>
  
  <pre><code>vi t.txt
  </code></pre>
  
  <p>I cannot save the changes. It returns this error</p>
  
  <pre><code>E514: write error (file system full?)
  WARNING: Original file may be lost or damaged
  don't quit the editor until the file is successfully written!
  </code></pre>
  
  <p>Here is the output of df command</p>
  
  <pre><code> Filesystem            Size  Used Avail Use% Mounted on
  /dev/sda1             9.9G  9.4G     0 100% /
  devtmpfs              854M  116K  854M   1% /dev
  none                  871M     0  871M   0% /dev/shm
  none                  871M   48K  871M   1% /var/run
  none                  871M     0  871M   0% /var/lock
  none                  871M     0  871M   0% /lib/init/rw
  /dev/sda2             335G  195M  318G   1% /mnt
  </code></pre>
  
  <p>but when I run sudo du -sh, the output is </p>
  
  <pre><code>/$ sudo du -sh /
  du: cannot access `/proc/32760/task/32760/fd/4': No such file or directory
  du: cannot access `/proc/32760/task/32760/fdinfo/4': No such file or directory
  du: cannot access `/proc/32760/fd/4': No such file or directory
  du: cannot access `/proc/32760/fdinfo/4': No such file or directory
  855M    /
  </code></pre>
  
  <p>It is far from full. Anybody can tell me why? </p>