'Jupyter notebook can't find my ssl certfile, unless I run as sudo

I have configured jupyter notebook to run as a server.

I have configured jupyter_notebook_config.py like so:

c.NotebookApp.certfile = u'/absolute/path/to/my/certificate/fullchain.pem'
c.NotebookApp.keyfile = u'/absolute/path/to/my/certificate/privkey.pem'

If I run jupyter notebook, it returns:

    'certfile "%s" does not exist' % self.ssl_options["certfile"]
ValueError: certfile "/absolute/path/to/my/certificate/fullchain.pem" does not exist

The file actually does exists, at that location.

If I run sudo jupyter notebook everything works. However, I would rather not run this as sudo. What should I do?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source