title: Jupyter Notebook: Access to the file was denied
body: <p>I'm trying to run a Jupyter notebook on Ubuntu 21.10. I've installed python, jupyter notebook, and all the various prerequisites. I added <code>export PATH=$PATH:~/.local/bin</code> to my <code>bashrc</code> so that the command <code>jupyter notebook</code> would be operational from the terminal.</p>
  <p>When I call <code>jupyter notebook</code> from the terminal, I get the following error message from my browser:</p>
  <pre><code>Access to the file was denied.
  
  The file at /home/username/.local/share/jupyter/runtime/nbserver-260094-open.html is not readable.
  
      It may have been removed, moved, or file permissions may be preventing access.
  </code></pre>
  <p>I'm using the latest version of FireFox.</p>
  <p>I've read a number of guides on this and it seems to be a permissions error, but none of the guides that I've used have resolved the issue. Using <code>sudo</code> does not help, in fact it causes <code>Exception: Jupyter command &quot;jupyter-notebook&quot; not found.</code> to be thrown.</p>
  <p>That being said, I am still able to access the notebook server. If I go to the terminal and instead click on the <code>localhost:8888</code> or IP address of the notebook server then it takes me to the notebook and everything runs without issue.</p>
  <p>I would like to solve this so that when I run <code>jupyter notebook</code> I'm taken to the server and don't need to go back to the terminal window and click the IP address. It's inconvenient and can slow me down if I'm running multiple notebooks at once.</p>
  <p>Any help on this issue would be greatly appreciated!</p>