Cannot open new Jupyter Notebook [Permission Denied]

change the ownership of the ~/.local/share/jupyter directory from root to user.

sudo chown -R user:user ~/.local/share/jupyter 

see here:

The first user before the colon is your username, the second user after the colon is your group. If you get chown: [user]: illegal group name, find your group with groups, or specify no group with sudo chown user: ~/.local/share/jupyter.

EDIT: Added -R option in comments to the answer. You have to change ownership of all files inside this directory (or inside ~/.jupyter/, wherever it gives you PermissionError) to your user to make it work.

If this fails, change the ownership of the directory you want to create the notebook in. For mydir:

sudo chown -R user:user mydir/*

Note that I replaced user:user with bexgboost:root where bexgboost is my UNIX username.

Leave a Comment