-
Notifications
You must be signed in to change notification settings - Fork 241
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
[BUG]macOS FATA /etc/hosts is not readable/writable by the current user #618
Comments
@jr00n I did try same on my mac machine and didn't able to get the
Can you put the output of your
|
@jr00n Same as @praveenkumar , can't reproduce :(
|
@jr00n looks like we found out the bug so if you are new user of crc you are hitting it because of recent changes in the file permission. As a work around can you do following and then use the crc ?
|
@praveenkumar Thanks, that is working for me. |
During the refactor to add gosec in our CI we changed the file permission from `655` to `500` and this file should be write able by the user so permission should be `0600`
fixed by #618 but it is affecting beta release so pining it. |
I had exactly same issue and workaround But then I got
When I checked
So I applied |
Yes, this is the same issue, both will be fixed at the same time. |
I ran into the same permission issues with /etc/hosts and /etc/resolver/testing. After fixing the permissions, when I try to run crc start, I get the following error. ./crc start |
@boomkap - I had the same issues and then got your error. I deleted the folder ~/.crc folder and went through setup again and was able to get the cluster to start |
@mcanoy - Thanks for the tip. That did the trick as well for me. I ran into the following error during rebuilding the cluster. Strange that the /etc/resolv.conf file exists and is readable by the user that I used to run crc start. It tried a few more times with the same error but finally completed the install. ERRO Unable to read host resolv file (Temporary Error: Failed to read resolv.conf: open /etc/resolv.conf: no such file or directory*****************************Temporary Error: Failed to read resolv.conf: open /etc/resolv.conf: no such file or directory******************************************************************* |
Still hitting the same with latest version:
Changing permissions of /etc/hosts can be a workaround but it should be at least documented that one needs to do so.. also it should really fail at |
Also.. to workaround this only way is eg the following for me (and then it hits another error)
After stop and start again, it hits the error reported by others in previous comments then it hits Overall it does not make for a smooth experience.. |
I have similar output when starting crc Although I in my case the permissions for /etc/hosts and /etc/resolver/testing seems ok The proboem in my case is that the hosts file is actually ignored. Restart does not help, clearing the cache neither. It happened only once that I was able to do something (I though that it helped when I stopped Docker Desktop) that helped and everything worked for a while so I was able to run Docker Desktop, CRC and Minishift at the same time. Then I shut down CRC and Minishift and after a while I realized the probelm is back. Tried to restart my MAC, stope Docker Deskotp, but no luck this time :-( |
Permissions are not correct here, this is not writable by a regular user, only by root. Are you running any VPN software? |
OMG indeed :-) sudo ping works, so I changed it to 644. No Idea who change it :-) |
Hitting the same problem, with the latest crc. That file should be remain readable by everyone, and writable only by
OS: macOS Catalina (10.15.4) Latest CRC version from: https://mirror.openshift.com/pub/openshift-v4/clients/crc/1.10.0/
Not sure why this was closed 8 months ago, and the problem still exists... |
Because 8 months ago this was a different bug which was fixed by 1a6a88c |
Are you running any vpn/antivirus/... software which might change the permissions of that file? |
Hi @cfergeau Ownership and permissions of /etc/hosts (this is MacOS default):
Run
Ownership and permissions of
The ownership & permissions of system files should not be mucked with (IMHO), and the installer should prompt for creds if/when it needs them to modify system files. |
Ah yes, of course it's doing this. I misread your initial comment because the bug you answered to was a bug where crc failed to change these permissions. I agree with you that it's suboptimal, but we don't want to ask for sudo permissions at |
General information
crc setup
before starting it: YesCRC version
CRC status
CRC config
Host Operating System
~ » sw_vers ProductName: Mac OS X ProductVersion: 10.14.6 BuildVersion: 18G95
Steps to reproduce
Expected
starting cluster
Actual
FATA /etc/hosts is not readable/writable by the current user
stops
Logs
https://gist.github.com/jr00n/9c3bc02e1fe9fdbde042dc7d5b317cfa
The text was updated successfully, but these errors were encountered: