title: WebDriverException from Selenium firefox_binary.py only when ran from mod_wsgi
body: <p>I am running Python 2.7, Virtualenv, Django 1.3, mod_wsgi, Apache application on Ubuntu 11.04.
  Everything including psycopg2 etc are working great with wsgi and app are up and running.
  The only issue is with Selenium. I am getting this error <strong>ONLY when I execute this from wsgi</strong> on creating firefox driver as follows:</p>
  
  <pre><code>from selenium import webdriver
  wd = webdriver.Firefox()
  </code></pre>
  
  <blockquote>
    <p>WebDriverException Exception Value:    Message: "Can't load the profile.
    Profile Dir : /tmp/tmp8h7MW8"</p>
  </blockquote>
  
  <p>my Selenium version is 2.5
  Apache launched as root and child process are launched as user called app.</p>
  
  <p>Execute the code above from same virtualenv without wsgi works just fine.</p>
  
  <p>So this makes me think that it is permission issue at some level... so I tried this:</p>
  
  <pre><code>ls -l /tmp/tmp8h7MW8
  &gt;&gt; drwxr-xr-x 3 app app 4096 2011-10-07 13:09 extensions
  &gt;&gt; -rw-r--r-- 1 app app 2188 2011-10-07 13:09 user.js
  </code></pre>
  
  <p>I would appreciated it if you could point me to right direction as to what I am might be misconfiguring wsgi </p>