title: IOError: [Errno 13] Permission denied: 'geckodriver.log when running Python/Selenium
body: <p>Receiving  the following error when running Selenium via Flask/Python</p>
  
  <pre><code>browser = webdriver.Firefox()
  [Wed Mar 07 03:02:27.719608 2018] [:error] [pid 21555] [client 108.162.250.6:36139]   File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 151, in __init__
  [Wed Mar 07 03:02:27.719611 2018] [:error] [pid 21555] [client 108.162.250.6:36139]     log_path=log_path)
  [Wed Mar 07 03:02:27.719614 2018] [:error] [pid 21555] [client 108.162.250.6:36139]   File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/service.py", line 44, in __init__
  [Wed Mar 07 03:02:27.719617 2018] [:error] [pid 21555] [client 108.162.250.6:36139]     log_file = open(log_path, "a+") if log_path is not None and log_path != "" else None
  [Wed Mar 07 03:02:27.719620 2018] [:error] [pid 21555] [client 108.162.250.6:36139] IOError: [Errno 13] Permission denied: 'geckodriver.log'
  </code></pre>
  
  <p>The function is</p>
  
  <pre><code>def get_index(api_key):
      if str(api_key)!=the_api_key:
          return 401
      base_url = 'www.google.com'
      browser = webdriver.Firefox()
      browser.get(base_url)
      html = browser.page_source
      return html
  </code></pre>
  
  <p>If I go directly to the application directory and run the script (<code>python run.py</code>) then I do not get the error.</p>
  
  <p>Based upon this, it seems like the log file is not writeable when ran via Flask, but where should the file be located?</p>
  
  <p><code>geckdriver</code> executable is installed in <code>/usr/local/bin/</code></p>