title: symfony2 : failed to write cache directory
body: <p>I have had to use the </p>
  
  <pre><code>app/console cache:clear  command
  </code></pre>
  
  <p>to solve a problem when generating an entity.</p>
  
  <p>I am now unable to load my homepage on :</p>
  
  <pre><code>  http://localhost/projet_etienne/web/app_dev.php
  </code></pre>
  
  <p>it says :</p>
  
  <blockquote>
    <p>RuntimeException: Failed to write cache file "/var/www/projet_etienne/app/cache/dev/classes.php".</p>
  </blockquote>
  
  <p>I don't understand much about this cache business!</p>
  
  <p>In my <code>app/cache</code> folder, I got a <code>dev</code>, a <code>dev_new</code>, a <code>dev_old</code> folder. Is that normal?</p>
  
  <p>the</p>
  
  <pre><code>app/console cache:clear
  </code></pre>
  
  <p>generates by the way a :</p>
  
  <blockquote>
    <p>[ErrorException]
    Warning: rename(/var/www/projet_etienne/app/cache/dev,/var/www/projet_etien<br>
          ne/app/cache/dev_old): Directory not empty in /var/www/projet_etienne/vendo<br>
         r/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearComm<br>
         and.php line 77   </p>
  </blockquote>
  
  <p>please help!</p>