# Notebook permissions issue (Seems to involve an issue with Anaconda-navigator)

**URL:** https://discourse.jupyter.org/t/notebook-permissions-issue-seems-to-involve-an-issue-with-anaconda-navigator/10103
**Category:** Notebook
**Tags:** help-wanted, notebook
**Created:** [July 24, 2021, 3:12pm UTC](https://discourse.jupyter.org/t/notebook-permissions-issue-seems-to-involve-an-issue-with-anaconda-navigator/10103 "2021-07-24T15:12:17Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![as131](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/as131/32/4853_2.png) [@as131](https://discourse.jupyter.org/u/as131)
#### Post date: [July 24, 2021, 3:12pm UTC](https://discourse.jupyter.org/t/notebook-permissions-issue-seems-to-involve-an-issue-with-anaconda-navigator/10103/1 "2021-07-24T15:12:17Z")

</div>

Hi all,

First off, I’m sorry, please forgive me I promise I’m not being dense. I’m doing some undergraduate research and so this is all pretty new to me. Given the behaviors I feel like I’m missing something very super basic like “the outlet is wired in series with the light so you have to turn on the light switch to run power to the outlet”.

I am running Ubuntu 20.04 LTS. I installed ROOT and Geant4 by hand both are functioning (probably unrelated but giving as much background as I can just in case). I then installed Anaconda 2.0.4. Anaconda installed Jupyter Notebook 6.3.0. Everything ran fine, worked fine. I ran my tests, everything produced expected data outputs. I then came back in the morning, turned on my computer and booted up `$ anaconda-navagator`. It booted up as expected, clicked to launch Jupyter Notebook exactly as the night before. The navagator claimed it started the notebook but nothing popped up. Following troubleshooting guidelines I attempted running `$ python notebook` and received the following Errno 13.

```auto
Traceback (most recent call last):
  File "/home/a/anaconda3/bin/jupyter-notebook", line 11, in <module>
    sys.exit(main())
  File "/home/a/.local/lib/python3.8/site-packages/jupyter_core/application.py", line 254, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/home/a/anaconda3/lib/python3.8/site-packages/traitlets/config/application.py", line 844, in launch_instance
    app.initialize(argv)
  File "/home/a/anaconda3/lib/python3.8/site-packages/traitlets/config/application.py", line 87, in inner
    return method(app, *args, **kwargs)
  File "/home/a/.local/lib/python3.8/site-packages/notebook/notebookapp.py", line 2116, in initialize
    super().initialize(argv)
  File "/home/a/anaconda3/lib/python3.8/site-packages/traitlets/config/application.py", line 87, in inner
    return method(app, *args, **kwargs)
  File "/home/a/.local/lib/python3.8/site-packages/jupyter_core/application.py", line 229, in initialize
    self.migrate_config()
  File "/home/a/.local/lib/python3.8/site-packages/jupyter_core/application.py", line 155, in migrate_config
    migrate()
  File "/home/a/.local/lib/python3.8/site-packages/jupyter_core/migrate.py", line 245, in migrate
    with open(os.path.join(env['jupyter_config'], 'migrated'), 'w') as f:
PermissionError: [Errno 13] Permission denied: '/usr/local/root/etc/notebook/migrated'

```

I received the same error via `$ jupyter-notebook` as well. Technically `$ sudo jupyter-notebook --allow-root` brings up a note book but without any of the functionality. I’ve googled the issue and found a stack-overflow with the same issue but they are running on mac and none of the suggested fixes seem to work with ubuntu. This being the only direct representation of the same issue in the help forums reinforces my belief that I’m missing something super basic. Hopefully it is paired with a similarly basic fix.

Let me know if you need any more data. And thank you so so much in advance for all your help in advance.

---

<div class="post-metadata">

### Author: ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)
#### Post date: [July 24, 2021, 7:35pm UTC](https://discourse.jupyter.org/t/notebook-permissions-issue-seems-to-involve-an-issue-with-anaconda-navigator/10103/2 "2021-07-24T19:35:49Z")

</div>

There some suggestions for Linux permissions errors at [Anaconda’s Troubleshooting documentation](https://docs.anaconda.com/anaconda/navigator/troubleshooting/) dealing with a licenses directory. Tried that?

Tried the idea described [here](https://github.com/ContinuumIO/anaconda-issues/issues/11671#issuecomment-855016921)?

Failing those working…  
Did you try the following in your terminal before running Anaconda or Jupyter?:

```bash
sudo chown -R user: /usr/local/root/etc/notebook

```

Where you substitute `user` with your username in that command.

---

<div class="post-metadata">

### Author: ![as131](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/as131/32/4853_2.png) [@as131](https://discourse.jupyter.org/u/as131)
#### Post date: [July 24, 2021, 9:13pm UTC](https://discourse.jupyter.org/t/notebook-permissions-issue-seems-to-involve-an-issue-with-anaconda-navigator/10103/3 "2021-07-24T21:13:48Z")

</div>

Yup sorry I should have clarified. Tried all the stuff from Anaconda as well.

I don’t have anything in ~/etc/conda so I don’t think that one is likely.

Tried the chown suggestion and the error changed toooo:

```auto
[C 17:07:04.825 NotebookApp] Bad config encountered during initialization: The 'kernel_spec_manager_class' trait of <notebook.notebookapp.NotebookApp object at 0x7fb0678f9f70> instance must be a type, but 'nb_conda_kernels.CondaKernelSpecManager' could not be imported

```

reinstall? Or is there a way to fix the config without a full reinstall?

---

<div class="post-metadata">

### Author: ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)
#### Post date: [July 24, 2021, 10:17pm UTC](https://discourse.jupyter.org/t/notebook-permissions-issue-seems-to-involve-an-issue-with-anaconda-navigator/10103/4 "2021-07-24T22:17:42Z")

</div>

Interesting the error changed. Hard to say yet if directly getting at issue, but I’m hoping that is progress.

> [@as131](#):
>
> `Bad config encountered during initialization`

Already tried the stuff noted [here](https://stackoverflow.com/a/63372590/8508004), [here](https://github.com/jupyterhub/jupyterhub/issues/444#issuecomment-522809168), or [here](https://github.com/jupyter/notebook/issues/274)?

---

<div class="post-metadata">

### Author: ![as131](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/as131/32/4853_2.png) [@as131](https://discourse.jupyter.org/u/as131)
#### Post date: [July 24, 2021, 11:31pm UTC](https://discourse.jupyter.org/t/notebook-permissions-issue-seems-to-involve-an-issue-with-anaconda-navigator/10103/5 "2021-07-24T23:31:48Z")

</div>

> [@fomightez](#):
>
> etting at issue, bu

No direct joy. After clearing the config-dir follow up attempts returned to the error ending in

`PermissionError: [Errno 13] Permission denied: '/usr/local/root/etc/notebook/migrated'`

very interesting, upon a whim I went back and checked the config-dir and found that it propagated a new file migrated which makes it `/usr/local/root/etc/notebook/migrated` ie. the file throwing the Errno 13. I checked the file using emacs and it contains only this one line `021-07-24T23:22:33.322252`

---

<div class="post-metadata">

### Author: ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)
#### Post date: [July 25, 2021, 3:25am UTC](https://discourse.jupyter.org/t/notebook-permissions-issue-seems-to-involve-an-issue-with-anaconda-navigator/10103/6 "2021-07-25T03:25:53Z")

</div>

Sorry, I’m stumped. I didn’t come across anything more.  
Maybe someone else will see this and be able to help you sort it?

---

<div class="post-metadata">

### Author: ![as131](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/as131/32/4853_2.png) [@as131](https://discourse.jupyter.org/u/as131)
#### Post date: [July 27, 2021, 2:49am UTC](https://discourse.jupyter.org/t/notebook-permissions-issue-seems-to-involve-an-issue-with-anaconda-navigator/10103/7 "2021-07-27T02:49:03Z")

</div>

Good news. You got it to throw that new `Bad config...` error. I spent some time tracking that error. Found that I had somehow partially started a second environment called `notebook` that was gumming up and confusing things. I must have drifted a bit more than I thought I was that first night at my desk and input some wonky stuff. The computer (and to be fair, mostly the user ie myself) were getting confused where notebook meant the environment and where it meant the jupyter. And it was only partially setup so there was some gumming up there. Anyway, so I grabbed a conda command sheet, and removed the bad extra environment via `conda env remove --name notebook` and then full uninstalled and reinstalled anaconda. Things are back to working properly. Thank you for helping to shift me onto the right path. I never would have gotten there if you hadn’t helped figure out it was an issue with the `Bad config...`.

Gonna’ mark this as my solution so hopefully it can be closed. Thank you again for all your help.

---

<div class="post-metadata">

### Author: ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)
#### Post date: [July 27, 2021, 3:27pm UTC](https://discourse.jupyter.org/t/notebook-permissions-issue-seems-to-involve-an-issue-with-anaconda-navigator/10103/8 "2021-07-27T15:27:57Z")

</div>

Very glad to hear it seems sorted now.  
And thanks very much for posting the solution. Hopefully it will help others.
