docker warning config.json permission denied












50















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?










share|improve this question























  • The official documentation has a nice section named Manage Docker as a non-root user.

    – Moez
    Mar 12 at 16:45
















50















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?










share|improve this question























  • The official documentation has a nice section named Manage Docker as a non-root user.

    – Moez
    Mar 12 at 16:45














50












50








50


14






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?










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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



















  • 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










1 Answer
1






active

oldest

votes


















85














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.






share|improve this answer


























  • 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 do chown -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.json just copy paste.

    – SWiggels
    Jun 8 '17 at 9:07












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









85














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.






share|improve this answer


























  • 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 do chown -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.json just copy paste.

    – SWiggels
    Jun 8 '17 at 9:07


















85














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.






share|improve this answer


























  • 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 do chown -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.json just copy paste.

    – SWiggels
    Jun 8 '17 at 9:07
















85












85








85







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.






share|improve this answer















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.







share|improve this answer














share|improve this answer



share|improve this answer








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 do chown -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.json just 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






  • 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 do chown -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.json just 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







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?



Popular posts from this blog

Category:香港粉麵

List *all* the tuples!

Channel [V]