2

I am running Jupyter Notebook on Ubuntu, when I execute jupyter notebook from my terminal, my Firefox browser opened and it displayed

Access to the file was denied

The file at /home/hd2900/.local/share/jupyter/runtime/nbserver-95755-open.html is not readable.

It may have been removed, moved, or file permissions may be preventing access.

I have checked my permission and also folder ownership and I don't see any issues with them.

drwxrwxr-x  5 hd2900 hd2900  4096 Nov 13 12:29 .local
drwxrwxr-x 20 hd2900 hd2900 4096 Nov 19 18:41 share
drwxrwxr-x  3 hd2900 hd2900  4096 Nov 19 19:01 jupyter
drwxrwxr-x  2 hd2900 hd2900  4096 Nov 19 19:26 runtime
-rwxrwxr-x 1 hd2900 hd2900  302 Nov 19 19:26 nbserver-96048.json
-rwxrwxr-x 1 hd2900 hd2900  673 Nov 19 19:26 nbserver-96048-open.html

I have noticed that using the two http links works. The reason why I need the file:///home/hd2900/.local/share/jupyter/runtime/nbserver-96048-open.html is because I need to write a bash script later on allowing jupyter notebook to launch by executing the bash script.

(env) hd2900@hd2900:~/Documents/Python/takeawayGeoManager$ jupyter notebook
[I 19:26:06.711 NotebookApp] Serving notebooks from local directory: /home/hd2900/Documents/Python/takeawayGeoManager
[I 19:26:06.712 NotebookApp] Jupyter Notebook 6.4.5 is running at:
[I 19:26:06.712 NotebookApp] http://localhost:8888/?token=5cd13f360718079f519e4cfb0eb694ab708382a7db93a557
[I 19:26:06.712 NotebookApp]  or http://127.0.0.1:8888/?token=5cd13f360718079f519e4cfb0eb694ab708382a7db93a557
[I 19:26:06.712 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 19:26:07.009 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///home/hd2900/.local/share/jupyter/runtime/nbserver-96048-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=5cd13f360718079f519e4cfb0eb694ab708382a7db93a557
     or http://127.0.0.1:8888/?token=5cd13f360718079f519e4cfb0eb694ab708382a7db93a557
jxw
  • 586
  • 2
  • 6
  • 36
  • how are you running this? is this inside a docker container or do you have a local ubuntu desktop/laptop? is this on a server? – Michael Delgado Nov 20 '21 at 19:54
  • also is this actually a [jupyterhub](https://jupyter.org/hub) deployment or just jupyter notebook? – Michael Delgado Nov 20 '21 at 20:10
  • It is a jupyter notebook deployment. I have installed it via the pip install jupyter command in my Python project folder within a virtual environment. I am running it locally using the jupyter notebook command from terminal – jxw Nov 21 '21 at 06:47
  • I had this problem too, and I tried this link: [https://askubuntu.com/questions/1217639/jupyter-notebook-access-issue-in-chromium](https://askubuntu.com/questions/1217639/jupyter-notebook-access-issue-in-chromium) – Fatemeh Jan 01 '22 at 11:10

0 Answers0