Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

none as non-root: Unable to load config: stat: stat config.json: permission denied #7107

Closed
hussnainjav3d opened this issue Mar 19, 2020 · 6 comments · Fixed by #7388
Closed
Labels
kind/support Categorizes issue or PR as a support question. os/linux triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@hussnainjav3d
Copy link

The exact command to reproduce the issue:
minikube start --vm-driver=virtualbox

The full output of the command that failed:

E0319 15:43:50.410596 17940 notify.go:66] write time failed: Error writing current update time to file: : writefile failed for /home/hussnain/.minikube/last_update_check: open /home/hussnain/.minikube/last_update_check: permission denied
🎉 minikube 1.8.2 is available! Download it: https://github.com/kubernetes/minikube/releases/tag/v1.8.2
💡 To disable this notice, run: 'minikube config set WantUpdateNotification false'

🙄 minikube v1.7.3 on Ubuntu 18.04
💣 Unable to load config: stat: stat /home/hussnain/.minikube/profiles/minikube/config.json: permission denied

The output of the minikube logs command:

The operating system version:
Linux javed 5.3.0-40-generic #32~18.04.1-Ubuntu SMP Mon Feb 3 14:05:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

@tstromberg tstromberg changed the title Minikube not started Unable to load config: stat: stat profiles/minikube/config.json: permission denied Mar 19, 2020
@tstromberg
Copy link
Contributor

Can you share the output of:

  • id
  • stat /home/hussnain/.minikube/profiles/minikube/config.json
  • touch /home/hussnain/.minikube/profiles/minikube/config.json

Thank you!

@tstromberg
Copy link
Contributor

My guess is that the files are not owned by the user you are running minikube as.

@tstromberg tstromberg added triage/needs-information Indicates an issue needs more information in order to work on it. kind/support Categorizes issue or PR as a support question. labels Mar 19, 2020
@habib-ali
Copy link

I am facing the same issue. I used minikube installation guide to install minikube on my ubuntu 18.04.
I have installed docker on my system and used "none" as a vm-driver to start minikube.
Output of
minikube start --vm-driver=none
is this
😄 minikube v1.8.2 on Ubuntu 18.04
💣 Unable to load config: stat: stat /home/healyhwire/.minikube/profiles/minikube/config.json: permission denied

upon doing
stat /home/healyhwire/.minikube/profiles/minikube/config.json
it says
stat: cannot stat '/home/healyhwire/.minikube/profiles/minikube/config.json': Permission denied

I have checked owner of the file using sudo ls -al /home/healyhwire/.minikube/profiles/minikube/config.json and found that owner is root

Please suggest me what can I do to solve this issue. If I try to copy this file to make myself as owner it cannot access file even to copy it.

@mancini0
Copy link

I'm hitting the same issue on 18.04 following this guide https://www.howtoforge.com/how-to-install-kubernetes-with-minikube-on-ubuntu-1804-lts/

@tstromberg
Copy link
Contributor

tstromberg commented Mar 21, 2020

@habib-ali - Thank you! We can improve that error message. Using --vm-driver=none requires sudo, at least until #3760 is fixed.

@tstromberg tstromberg changed the title Unable to load config: stat: stat profiles/minikube/config.json: permission denied none as non-root: Unable to load config: stat: stat config.json: permission denied Mar 21, 2020
@tstromberg tstromberg added the needs-solution-message Issues where where offering a solution for an error would be helpful label Mar 21, 2020
@habib-ali
Copy link

habib-ali commented Mar 22, 2020

@tstromberg I tried to use sudo to start minikube cluster but I think it is causing issues in next processes. e.g I am exposing a service using kubectl to be used by minikube using the following sample commands
kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.4
kubectl expose deployment hello-minikube --type=NodePort --port=8080
and then I do
sudo minikube service hello-minikube
It generates the following output (after some research I found out that browser do not support to be opened as root)

|-----------|----------------|-------------|------------------------------|
| NAMESPACE | NAME | TARGET PORT | URL |
|-----------|----------------|-------------|------------------------------|
| default | hello-minikube | | http://192.168.100.108:30754 |
|-----------|----------------|-------------|------------------------------|
🎉 Opening service default/hello-minikube in default browser...
[1165:1165:0322/095515.027297:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
[1175:1175:0322/095515.067753:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
Running Firefox as root in a regular user's session is not supported. ($HOME is /home/healyhwire which is owned by healyhwire.)
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: iceweasel: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: seamonkey: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: mozilla: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: epiphany: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: konqueror: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: chromium: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: chromium-browser: not found
[1212:1212:0322/095515.262484:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: www-browser: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: links2: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: elinks: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: links: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: lynx: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: w3m: not found
xdg-open: no method available for opening 'http://192.168.100.108:30754'

💣 open url failed: http://192.168.100.108:30754: exit status 3

😿 minikube is exiting due to an error. If the above message is not useful, open an issue:
👉 https://github.com/kubernetes/minikube/issues/new/choose

If I run minikube service without sudo, it generate other permission errors.

@tstromberg tstromberg removed the needs-solution-message Issues where where offering a solution for an error would be helpful label Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question. os/linux triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants