docker warning config.json permission denied
I just installed docker and created a group and added my username to it to avoid using sudo every time. However when I do the test and run docker run hello-world it gives me following error:
WARNING: Error loading config file:/home/user/.docker/config.json - stat /home/user/.docker/config.json: permission denied
But then it continues and gives a success message:Hello from Docker.
This message shows that your installation appears to be working correctly.
Any ideas whats wrong and what implications does it have?
permissions docker
add a comment |
I just installed docker and created a group and added my username to it to avoid using sudo every time. However when I do the test and run docker run hello-world it gives me following error:
WARNING: Error loading config file:/home/user/.docker/config.json - stat /home/user/.docker/config.json: permission denied
But then it continues and gives a success message:Hello from Docker.
This message shows that your installation appears to be working correctly.
Any ideas whats wrong and what implications does it have?
permissions docker
The official documentation has a nice section named Manage Docker as a non-root user.
– Moez
Mar 12 at 16:45
add a comment |
I just installed docker and created a group and added my username to it to avoid using sudo every time. However when I do the test and run docker run hello-world it gives me following error:
WARNING: Error loading config file:/home/user/.docker/config.json - stat /home/user/.docker/config.json: permission denied
But then it continues and gives a success message:Hello from Docker.
This message shows that your installation appears to be working correctly.
Any ideas whats wrong and what implications does it have?
permissions docker
I just installed docker and created a group and added my username to it to avoid using sudo every time. However when I do the test and run docker run hello-world it gives me following error:
WARNING: Error loading config file:/home/user/.docker/config.json - stat /home/user/.docker/config.json: permission denied
But then it continues and gives a success message:Hello from Docker.
This message shows that your installation appears to be working correctly.
Any ideas whats wrong and what implications does it have?
permissions docker
permissions docker
asked Mar 19 '16 at 11:23
TrmTrm
365136
365136
The official documentation has a nice section named Manage Docker as a non-root user.
– Moez
Mar 12 at 16:45
add a comment |
The official documentation has a nice section named Manage Docker as a non-root user.
– Moez
Mar 12 at 16:45
The official documentation has a nice section named Manage Docker as a non-root user.
– Moez
Mar 12 at 16:45
The official documentation has a nice section named Manage Docker as a non-root user.
– Moez
Mar 12 at 16:45
add a comment |
1 Answer
1
active
oldest
votes
Try running
sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
sudo chmod g+rwx "/home/$USER/.docker" -R
$USER is the username of the currently logged in user.
thanks, that seem to have done it. Just a question, since I changed ownership to my user. Would it be better to change ownership to a group: docker?
– Trm
Mar 19 '16 at 13:06
1
was a bit too fast and ran command from earlier root login. I still get the same error. I even tried running:sudo chown user:docker /home/user/.docker/config.json, but it didn't help
– Trm
Mar 19 '16 at 13:21
1
Hi. I moved away the file and everything seems to work fine now.
– Trm
Mar 20 '16 at 0:44
1
Cool @Trm I wonder if you maybe needed to dochown -R USER:DOCKER /home/USER/.docker?
– Grammargeek
Mar 20 '16 at 14:57
1
For the lazy:sudo chown $(whoami):docker /home/$(whoami)/.docker/config.jsonjust copy paste.
– SWiggels
Jun 8 '17 at 9:07
|
show 10 more comments
protected by Community♦ Mar 12 at 19:08
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try running
sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
sudo chmod g+rwx "/home/$USER/.docker" -R
$USER is the username of the currently logged in user.
thanks, that seem to have done it. Just a question, since I changed ownership to my user. Would it be better to change ownership to a group: docker?
– Trm
Mar 19 '16 at 13:06
1
was a bit too fast and ran command from earlier root login. I still get the same error. I even tried running:sudo chown user:docker /home/user/.docker/config.json, but it didn't help
– Trm
Mar 19 '16 at 13:21
1
Hi. I moved away the file and everything seems to work fine now.
– Trm
Mar 20 '16 at 0:44
1
Cool @Trm I wonder if you maybe needed to dochown -R USER:DOCKER /home/USER/.docker?
– Grammargeek
Mar 20 '16 at 14:57
1
For the lazy:sudo chown $(whoami):docker /home/$(whoami)/.docker/config.jsonjust copy paste.
– SWiggels
Jun 8 '17 at 9:07
|
show 10 more comments
Try running
sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
sudo chmod g+rwx "/home/$USER/.docker" -R
$USER is the username of the currently logged in user.
thanks, that seem to have done it. Just a question, since I changed ownership to my user. Would it be better to change ownership to a group: docker?
– Trm
Mar 19 '16 at 13:06
1
was a bit too fast and ran command from earlier root login. I still get the same error. I even tried running:sudo chown user:docker /home/user/.docker/config.json, but it didn't help
– Trm
Mar 19 '16 at 13:21
1
Hi. I moved away the file and everything seems to work fine now.
– Trm
Mar 20 '16 at 0:44
1
Cool @Trm I wonder if you maybe needed to dochown -R USER:DOCKER /home/USER/.docker?
– Grammargeek
Mar 20 '16 at 14:57
1
For the lazy:sudo chown $(whoami):docker /home/$(whoami)/.docker/config.jsonjust copy paste.
– SWiggels
Jun 8 '17 at 9:07
|
show 10 more comments
Try running
sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
sudo chmod g+rwx "/home/$USER/.docker" -R
$USER is the username of the currently logged in user.
Try running
sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
sudo chmod g+rwx "/home/$USER/.docker" -R
$USER is the username of the currently logged in user.
edited Dec 22 '16 at 21:55
answered Mar 19 '16 at 12:01
GrammargeekGrammargeek
1,76411021
1,76411021
thanks, that seem to have done it. Just a question, since I changed ownership to my user. Would it be better to change ownership to a group: docker?
– Trm
Mar 19 '16 at 13:06
1
was a bit too fast and ran command from earlier root login. I still get the same error. I even tried running:sudo chown user:docker /home/user/.docker/config.json, but it didn't help
– Trm
Mar 19 '16 at 13:21
1
Hi. I moved away the file and everything seems to work fine now.
– Trm
Mar 20 '16 at 0:44
1
Cool @Trm I wonder if you maybe needed to dochown -R USER:DOCKER /home/USER/.docker?
– Grammargeek
Mar 20 '16 at 14:57
1
For the lazy:sudo chown $(whoami):docker /home/$(whoami)/.docker/config.jsonjust copy paste.
– SWiggels
Jun 8 '17 at 9:07
|
show 10 more comments
thanks, that seem to have done it. Just a question, since I changed ownership to my user. Would it be better to change ownership to a group: docker?
– Trm
Mar 19 '16 at 13:06
1
was a bit too fast and ran command from earlier root login. I still get the same error. I even tried running:sudo chown user:docker /home/user/.docker/config.json, but it didn't help
– Trm
Mar 19 '16 at 13:21
1
Hi. I moved away the file and everything seems to work fine now.
– Trm
Mar 20 '16 at 0:44
1
Cool @Trm I wonder if you maybe needed to dochown -R USER:DOCKER /home/USER/.docker?
– Grammargeek
Mar 20 '16 at 14:57
1
For the lazy:sudo chown $(whoami):docker /home/$(whoami)/.docker/config.jsonjust copy paste.
– SWiggels
Jun 8 '17 at 9:07
thanks, that seem to have done it. Just a question, since I changed ownership to my user. Would it be better to change ownership to a group: docker?
– Trm
Mar 19 '16 at 13:06
thanks, that seem to have done it. Just a question, since I changed ownership to my user. Would it be better to change ownership to a group: docker?
– Trm
Mar 19 '16 at 13:06
1
1
was a bit too fast and ran command from earlier root login. I still get the same error. I even tried running:
sudo chown user:docker /home/user/.docker/config.json, but it didn't help– Trm
Mar 19 '16 at 13:21
was a bit too fast and ran command from earlier root login. I still get the same error. I even tried running:
sudo chown user:docker /home/user/.docker/config.json, but it didn't help– Trm
Mar 19 '16 at 13:21
1
1
Hi. I moved away the file and everything seems to work fine now.
– Trm
Mar 20 '16 at 0:44
Hi. I moved away the file and everything seems to work fine now.
– Trm
Mar 20 '16 at 0:44
1
1
Cool @Trm I wonder if you maybe needed to do
chown -R USER:DOCKER /home/USER/.docker ?– Grammargeek
Mar 20 '16 at 14:57
Cool @Trm I wonder if you maybe needed to do
chown -R USER:DOCKER /home/USER/.docker ?– Grammargeek
Mar 20 '16 at 14:57
1
1
For the lazy:
sudo chown $(whoami):docker /home/$(whoami)/.docker/config.json just copy paste.– SWiggels
Jun 8 '17 at 9:07
For the lazy:
sudo chown $(whoami):docker /home/$(whoami)/.docker/config.json just copy paste.– SWiggels
Jun 8 '17 at 9:07
|
show 10 more comments
protected by Community♦ Mar 12 at 19:08
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
The official documentation has a nice section named Manage Docker as a non-root user.
– Moez
Mar 12 at 16:45