# Hostname lookup failure / permission denied error



## Ben Shockley (Mar 11, 2016)

Hello.  I am brand new to FreeBSD.  I just installed a fresh version of 10.2 on VirtualBox, running on my 2014 MacBook pro retina. Installation went fine and all seems well, but when I try to ping say `ping google.com`
I get

```
Ping: cannot resolve google.com: Host name lookup failure
```

I figured that meant that my DNS wasn't setup correctly, so I went poking around to see what was going on.  When I try to access /etc/resolv.conf I get

```
/etc/resolv.conf: Permission denied
```

The permissions for resolv.conf are

```
-rw-r--r-- 1 root wheel
```

when I check `mount`
I get

```
/dev/ada0p2 on / (ufs, local, journaled soft-updates)
devfs on /dev (devfs, local, multilevel)
```

so the file system doesn't appear to be in read only mode.

The only other things I've seen about permission denied errors is errant tildes in a file, but I haven't edited or added any of my files or anything like that, so I'm not sure how that could have happened.  I can't seem to find anything else in my searching to help solve this.

My best guess is that dhclient(8) can't access resolv.conf to write a DNS address to it, being that I can't access it either as root?  But I have no idea where to go from here.

Any help would be greatly appreciated!

-- Ben


----------



## SirDice (Mar 14, 2016)

Do you set kern.securelevel?


----------



## Juha Nurmela (Mar 14, 2016)

Or any special flags set ? `ls -Fold / /etc /etc/resolv.conf /tmp`

Juha

those chflags(1) flags


----------



## Ben Shockley (Mar 14, 2016)

Sorry guys, I got impatient and figured that since I hadn't done anything really since I installed it, I went ahead and found a different guide and just did a full reinstall on a new virtual disk, and so far everything has been working fine on this new install.  So I am assuming I did something wrong, or something weird happened on the initial install, so I just went ahead and deleted that virtual system.  Thanks so much for the replies.  I am sure I will be spending quite a bit of time here in the future.  I am excited to finally start diving into all this.

-- Ben


----------

