I always have to access Jupyter Notebook as a root user
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
Every time, I use Jupyter Notebook in Ubuntu 18.04, I have to access sudo bash
first and then type jupyter notebook --allow-root
to use Jupyter Notebook without any problem. This is because when I use normal user to access jupyter notebook, I will always get this error.
Every time I try to create new jupyter notebook workspace, I will get this error. I can't just type $ jupyter notebook
to use Jupyter workspace and save my new creation.
Please, could you tell me how to fix this issue?
UPDATE
This is what I see in /home/sura/.local/share/jupyter/notebook_secret
using sudo nano
And this is what I see in ls -l /home/sura/.local/share/jupyter
18.04 jupyter
add a comment |Â
up vote
0
down vote
favorite
Every time, I use Jupyter Notebook in Ubuntu 18.04, I have to access sudo bash
first and then type jupyter notebook --allow-root
to use Jupyter Notebook without any problem. This is because when I use normal user to access jupyter notebook, I will always get this error.
Every time I try to create new jupyter notebook workspace, I will get this error. I can't just type $ jupyter notebook
to use Jupyter workspace and save my new creation.
Please, could you tell me how to fix this issue?
UPDATE
This is what I see in /home/sura/.local/share/jupyter/notebook_secret
using sudo nano
And this is what I see in ls -l /home/sura/.local/share/jupyter
18.04 jupyter
Have you checked the permissions of/home/sura/.local/share/jupyter/notebook_secret
? Runls -l /home/sura/.local/share/jupyter
and add the output to your question.
â Lienhart Woitok
May 20 at 11:12
Yes, I have checked the path /home/sura/.local/share/jupyter/notebook_secret, but there is nothing in there. It's totally empty.
â Liu Bei
May 20 at 11:34
I have updated all the requirements you need to see, do you have any solution for my issue? It seems that Jupyter Notebook was set to be used as root.
â Liu Bei
May 20 at 11:48
It is far easier for people to help you if in future you just copy and paste output from commands into your answer and mark them as code using the '' button instead of posting screenshots.
â Lienhart Woitok
May 20 at 12:16
I am so sorry. I will improve myself. By the way, do you have any solutions?
â Liu Bei
May 20 at 12:25
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Every time, I use Jupyter Notebook in Ubuntu 18.04, I have to access sudo bash
first and then type jupyter notebook --allow-root
to use Jupyter Notebook without any problem. This is because when I use normal user to access jupyter notebook, I will always get this error.
Every time I try to create new jupyter notebook workspace, I will get this error. I can't just type $ jupyter notebook
to use Jupyter workspace and save my new creation.
Please, could you tell me how to fix this issue?
UPDATE
This is what I see in /home/sura/.local/share/jupyter/notebook_secret
using sudo nano
And this is what I see in ls -l /home/sura/.local/share/jupyter
18.04 jupyter
Every time, I use Jupyter Notebook in Ubuntu 18.04, I have to access sudo bash
first and then type jupyter notebook --allow-root
to use Jupyter Notebook without any problem. This is because when I use normal user to access jupyter notebook, I will always get this error.
Every time I try to create new jupyter notebook workspace, I will get this error. I can't just type $ jupyter notebook
to use Jupyter workspace and save my new creation.
Please, could you tell me how to fix this issue?
UPDATE
This is what I see in /home/sura/.local/share/jupyter/notebook_secret
using sudo nano
And this is what I see in ls -l /home/sura/.local/share/jupyter
18.04 jupyter
edited May 20 at 11:47
asked May 20 at 10:25
Liu Bei
356
356
Have you checked the permissions of/home/sura/.local/share/jupyter/notebook_secret
? Runls -l /home/sura/.local/share/jupyter
and add the output to your question.
â Lienhart Woitok
May 20 at 11:12
Yes, I have checked the path /home/sura/.local/share/jupyter/notebook_secret, but there is nothing in there. It's totally empty.
â Liu Bei
May 20 at 11:34
I have updated all the requirements you need to see, do you have any solution for my issue? It seems that Jupyter Notebook was set to be used as root.
â Liu Bei
May 20 at 11:48
It is far easier for people to help you if in future you just copy and paste output from commands into your answer and mark them as code using the '' button instead of posting screenshots.
â Lienhart Woitok
May 20 at 12:16
I am so sorry. I will improve myself. By the way, do you have any solutions?
â Liu Bei
May 20 at 12:25
add a comment |Â
Have you checked the permissions of/home/sura/.local/share/jupyter/notebook_secret
? Runls -l /home/sura/.local/share/jupyter
and add the output to your question.
â Lienhart Woitok
May 20 at 11:12
Yes, I have checked the path /home/sura/.local/share/jupyter/notebook_secret, but there is nothing in there. It's totally empty.
â Liu Bei
May 20 at 11:34
I have updated all the requirements you need to see, do you have any solution for my issue? It seems that Jupyter Notebook was set to be used as root.
â Liu Bei
May 20 at 11:48
It is far easier for people to help you if in future you just copy and paste output from commands into your answer and mark them as code using the '' button instead of posting screenshots.
â Lienhart Woitok
May 20 at 12:16
I am so sorry. I will improve myself. By the way, do you have any solutions?
â Liu Bei
May 20 at 12:25
Have you checked the permissions of
/home/sura/.local/share/jupyter/notebook_secret
? Run ls -l /home/sura/.local/share/jupyter
and add the output to your question.â Lienhart Woitok
May 20 at 11:12
Have you checked the permissions of
/home/sura/.local/share/jupyter/notebook_secret
? Run ls -l /home/sura/.local/share/jupyter
and add the output to your question.â Lienhart Woitok
May 20 at 11:12
Yes, I have checked the path /home/sura/.local/share/jupyter/notebook_secret, but there is nothing in there. It's totally empty.
â Liu Bei
May 20 at 11:34
Yes, I have checked the path /home/sura/.local/share/jupyter/notebook_secret, but there is nothing in there. It's totally empty.
â Liu Bei
May 20 at 11:34
I have updated all the requirements you need to see, do you have any solution for my issue? It seems that Jupyter Notebook was set to be used as root.
â Liu Bei
May 20 at 11:48
I have updated all the requirements you need to see, do you have any solution for my issue? It seems that Jupyter Notebook was set to be used as root.
â Liu Bei
May 20 at 11:48
It is far easier for people to help you if in future you just copy and paste output from commands into your answer and mark them as code using the '' button instead of posting screenshots.
â Lienhart Woitok
May 20 at 12:16
It is far easier for people to help you if in future you just copy and paste output from commands into your answer and mark them as code using the '' button instead of posting screenshots.
â Lienhart Woitok
May 20 at 12:16
I am so sorry. I will improve myself. By the way, do you have any solutions?
â Liu Bei
May 20 at 12:25
I am so sorry. I will improve myself. By the way, do you have any solutions?
â Liu Bei
May 20 at 12:25
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Disclaimer: I have no experience with Jupyter.
It seems that your Jupyter data files are owned by root and therefore your user may not write to them. This is most probably the case because you ran Jupyter as root.
To rectify, you need to change the ownership of the files to your user.
Run sudo chown -R sura:sura /home/sura/.local/share/jupyter
and test if it works now. If it still does not work, check the error message. After the term "permission denied" is a path. Check the permissions of that path (ls -l <path>
) and if the file or directory belongs to root, change then owner (sudo chown -R sura:sura <path>
).
Afterwards, never run Jupyter as root, always as your user.
Hello, the solution you gave me causes another error.Unexpected error while saving file: Documents/python/Untitled.ipynb [Errno 13] Permission denied: u'/home/sura/Documents/python/.ipynb_checkpoints/Untitled-checkpoint.ipynb'
I don't know why this can happen, hahahaha
â Liu Bei
May 20 at 12:24
As stated, you need to repeat that process (check ownership and fix it) until you can save again. I suspect you have a bunch of files used by Jupyter and owned by root scattered all over your home directory. For this file you should check ownership of/home/sura/Documents/python/
and/home/sura/Documents/python/.ipynb_checkpoints
usingls -l path
. If either belongs to root, runsudo chown -R sura:sura
on it. If unsure you can just runsudo chown -R sura:sura /home/sura/Documents/python
and keep your fingers crossed.
â Lienhart Woitok
May 20 at 12:33
Hello, I can fix this issue by using your way. I have usedsudo chown -R sura:sura /home/sura/Documents/python/.ipynb_checkpoints
at the end. Thank you very much
â Liu Bei
May 20 at 12:33
Now I can just type$ jupyter notebook
in the terminal. And also I can use jupyter notebook as root.
â Liu Bei
May 20 at 12:37
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Disclaimer: I have no experience with Jupyter.
It seems that your Jupyter data files are owned by root and therefore your user may not write to them. This is most probably the case because you ran Jupyter as root.
To rectify, you need to change the ownership of the files to your user.
Run sudo chown -R sura:sura /home/sura/.local/share/jupyter
and test if it works now. If it still does not work, check the error message. After the term "permission denied" is a path. Check the permissions of that path (ls -l <path>
) and if the file or directory belongs to root, change then owner (sudo chown -R sura:sura <path>
).
Afterwards, never run Jupyter as root, always as your user.
Hello, the solution you gave me causes another error.Unexpected error while saving file: Documents/python/Untitled.ipynb [Errno 13] Permission denied: u'/home/sura/Documents/python/.ipynb_checkpoints/Untitled-checkpoint.ipynb'
I don't know why this can happen, hahahaha
â Liu Bei
May 20 at 12:24
As stated, you need to repeat that process (check ownership and fix it) until you can save again. I suspect you have a bunch of files used by Jupyter and owned by root scattered all over your home directory. For this file you should check ownership of/home/sura/Documents/python/
and/home/sura/Documents/python/.ipynb_checkpoints
usingls -l path
. If either belongs to root, runsudo chown -R sura:sura
on it. If unsure you can just runsudo chown -R sura:sura /home/sura/Documents/python
and keep your fingers crossed.
â Lienhart Woitok
May 20 at 12:33
Hello, I can fix this issue by using your way. I have usedsudo chown -R sura:sura /home/sura/Documents/python/.ipynb_checkpoints
at the end. Thank you very much
â Liu Bei
May 20 at 12:33
Now I can just type$ jupyter notebook
in the terminal. And also I can use jupyter notebook as root.
â Liu Bei
May 20 at 12:37
add a comment |Â
up vote
1
down vote
accepted
Disclaimer: I have no experience with Jupyter.
It seems that your Jupyter data files are owned by root and therefore your user may not write to them. This is most probably the case because you ran Jupyter as root.
To rectify, you need to change the ownership of the files to your user.
Run sudo chown -R sura:sura /home/sura/.local/share/jupyter
and test if it works now. If it still does not work, check the error message. After the term "permission denied" is a path. Check the permissions of that path (ls -l <path>
) and if the file or directory belongs to root, change then owner (sudo chown -R sura:sura <path>
).
Afterwards, never run Jupyter as root, always as your user.
Hello, the solution you gave me causes another error.Unexpected error while saving file: Documents/python/Untitled.ipynb [Errno 13] Permission denied: u'/home/sura/Documents/python/.ipynb_checkpoints/Untitled-checkpoint.ipynb'
I don't know why this can happen, hahahaha
â Liu Bei
May 20 at 12:24
As stated, you need to repeat that process (check ownership and fix it) until you can save again. I suspect you have a bunch of files used by Jupyter and owned by root scattered all over your home directory. For this file you should check ownership of/home/sura/Documents/python/
and/home/sura/Documents/python/.ipynb_checkpoints
usingls -l path
. If either belongs to root, runsudo chown -R sura:sura
on it. If unsure you can just runsudo chown -R sura:sura /home/sura/Documents/python
and keep your fingers crossed.
â Lienhart Woitok
May 20 at 12:33
Hello, I can fix this issue by using your way. I have usedsudo chown -R sura:sura /home/sura/Documents/python/.ipynb_checkpoints
at the end. Thank you very much
â Liu Bei
May 20 at 12:33
Now I can just type$ jupyter notebook
in the terminal. And also I can use jupyter notebook as root.
â Liu Bei
May 20 at 12:37
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Disclaimer: I have no experience with Jupyter.
It seems that your Jupyter data files are owned by root and therefore your user may not write to them. This is most probably the case because you ran Jupyter as root.
To rectify, you need to change the ownership of the files to your user.
Run sudo chown -R sura:sura /home/sura/.local/share/jupyter
and test if it works now. If it still does not work, check the error message. After the term "permission denied" is a path. Check the permissions of that path (ls -l <path>
) and if the file or directory belongs to root, change then owner (sudo chown -R sura:sura <path>
).
Afterwards, never run Jupyter as root, always as your user.
Disclaimer: I have no experience with Jupyter.
It seems that your Jupyter data files are owned by root and therefore your user may not write to them. This is most probably the case because you ran Jupyter as root.
To rectify, you need to change the ownership of the files to your user.
Run sudo chown -R sura:sura /home/sura/.local/share/jupyter
and test if it works now. If it still does not work, check the error message. After the term "permission denied" is a path. Check the permissions of that path (ls -l <path>
) and if the file or directory belongs to root, change then owner (sudo chown -R sura:sura <path>
).
Afterwards, never run Jupyter as root, always as your user.
answered May 20 at 12:16
![](https://i.stack.imgur.com/k9JBf.jpg?s=32&g=1)
![](https://i.stack.imgur.com/k9JBf.jpg?s=32&g=1)
Lienhart Woitok
808211
808211
Hello, the solution you gave me causes another error.Unexpected error while saving file: Documents/python/Untitled.ipynb [Errno 13] Permission denied: u'/home/sura/Documents/python/.ipynb_checkpoints/Untitled-checkpoint.ipynb'
I don't know why this can happen, hahahaha
â Liu Bei
May 20 at 12:24
As stated, you need to repeat that process (check ownership and fix it) until you can save again. I suspect you have a bunch of files used by Jupyter and owned by root scattered all over your home directory. For this file you should check ownership of/home/sura/Documents/python/
and/home/sura/Documents/python/.ipynb_checkpoints
usingls -l path
. If either belongs to root, runsudo chown -R sura:sura
on it. If unsure you can just runsudo chown -R sura:sura /home/sura/Documents/python
and keep your fingers crossed.
â Lienhart Woitok
May 20 at 12:33
Hello, I can fix this issue by using your way. I have usedsudo chown -R sura:sura /home/sura/Documents/python/.ipynb_checkpoints
at the end. Thank you very much
â Liu Bei
May 20 at 12:33
Now I can just type$ jupyter notebook
in the terminal. And also I can use jupyter notebook as root.
â Liu Bei
May 20 at 12:37
add a comment |Â
Hello, the solution you gave me causes another error.Unexpected error while saving file: Documents/python/Untitled.ipynb [Errno 13] Permission denied: u'/home/sura/Documents/python/.ipynb_checkpoints/Untitled-checkpoint.ipynb'
I don't know why this can happen, hahahaha
â Liu Bei
May 20 at 12:24
As stated, you need to repeat that process (check ownership and fix it) until you can save again. I suspect you have a bunch of files used by Jupyter and owned by root scattered all over your home directory. For this file you should check ownership of/home/sura/Documents/python/
and/home/sura/Documents/python/.ipynb_checkpoints
usingls -l path
. If either belongs to root, runsudo chown -R sura:sura
on it. If unsure you can just runsudo chown -R sura:sura /home/sura/Documents/python
and keep your fingers crossed.
â Lienhart Woitok
May 20 at 12:33
Hello, I can fix this issue by using your way. I have usedsudo chown -R sura:sura /home/sura/Documents/python/.ipynb_checkpoints
at the end. Thank you very much
â Liu Bei
May 20 at 12:33
Now I can just type$ jupyter notebook
in the terminal. And also I can use jupyter notebook as root.
â Liu Bei
May 20 at 12:37
Hello, the solution you gave me causes another error.
Unexpected error while saving file: Documents/python/Untitled.ipynb [Errno 13] Permission denied: u'/home/sura/Documents/python/.ipynb_checkpoints/Untitled-checkpoint.ipynb'
I don't know why this can happen, hahahahaâ Liu Bei
May 20 at 12:24
Hello, the solution you gave me causes another error.
Unexpected error while saving file: Documents/python/Untitled.ipynb [Errno 13] Permission denied: u'/home/sura/Documents/python/.ipynb_checkpoints/Untitled-checkpoint.ipynb'
I don't know why this can happen, hahahahaâ Liu Bei
May 20 at 12:24
As stated, you need to repeat that process (check ownership and fix it) until you can save again. I suspect you have a bunch of files used by Jupyter and owned by root scattered all over your home directory. For this file you should check ownership of
/home/sura/Documents/python/
and /home/sura/Documents/python/.ipynb_checkpoints
using ls -l path
. If either belongs to root, run sudo chown -R sura:sura
on it. If unsure you can just run sudo chown -R sura:sura /home/sura/Documents/python
and keep your fingers crossed.â Lienhart Woitok
May 20 at 12:33
As stated, you need to repeat that process (check ownership and fix it) until you can save again. I suspect you have a bunch of files used by Jupyter and owned by root scattered all over your home directory. For this file you should check ownership of
/home/sura/Documents/python/
and /home/sura/Documents/python/.ipynb_checkpoints
using ls -l path
. If either belongs to root, run sudo chown -R sura:sura
on it. If unsure you can just run sudo chown -R sura:sura /home/sura/Documents/python
and keep your fingers crossed.â Lienhart Woitok
May 20 at 12:33
Hello, I can fix this issue by using your way. I have used
sudo chown -R sura:sura /home/sura/Documents/python/.ipynb_checkpoints
at the end. Thank you very muchâ Liu Bei
May 20 at 12:33
Hello, I can fix this issue by using your way. I have used
sudo chown -R sura:sura /home/sura/Documents/python/.ipynb_checkpoints
at the end. Thank you very muchâ Liu Bei
May 20 at 12:33
Now I can just type
$ jupyter notebook
in the terminal. And also I can use jupyter notebook as root.â Liu Bei
May 20 at 12:37
Now I can just type
$ jupyter notebook
in the terminal. And also I can use jupyter notebook as root.â Liu Bei
May 20 at 12:37
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1038339%2fi-always-have-to-access-jupyter-notebook-as-a-root-user%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Have you checked the permissions of
/home/sura/.local/share/jupyter/notebook_secret
? Runls -l /home/sura/.local/share/jupyter
and add the output to your question.â Lienhart Woitok
May 20 at 11:12
Yes, I have checked the path /home/sura/.local/share/jupyter/notebook_secret, but there is nothing in there. It's totally empty.
â Liu Bei
May 20 at 11:34
I have updated all the requirements you need to see, do you have any solution for my issue? It seems that Jupyter Notebook was set to be used as root.
â Liu Bei
May 20 at 11:48
It is far easier for people to help you if in future you just copy and paste output from commands into your answer and mark them as code using the '' button instead of posting screenshots.
â Lienhart Woitok
May 20 at 12:16
I am so sorry. I will improve myself. By the way, do you have any solutions?
â Liu Bei
May 20 at 12:25