title: PHP-GD imagejpeg unable to open
body: <p>When trying to save a thumbnail made with GD</p>
  
  <pre><code>imagejpeg($tnImage, "../../img/thumbs/".$maxWidth."x".$maxHeight."_".$filename);
  </code></pre>
  
  <p>I am getting the following error:</p>
  
  <p><b>Warning</b>: imagejpeg() [function.imagejpeg]: Unable to open '../../img/thumbs/80x80_55865-drops.jpg' for writing: No such file or directory in <b>/home/user/workspace/stewart/server-side/libImg.php</b></p>
  
  <p>/home/user/workspace/img/thumbs has its permissions set to 0x777.</p>
  
  <p>What can be wrong here?</p>