0

I got this

drwxrwxr-x 3 root tunnel 100 date and time .
drwxr-xr-x 33 root root 860 date and time …
-rwxrwxr-x 1 root tunnel 0 date and time enable-updates
drwxrwxr-x 2 root tunnel 40 date and time interface
-rwxrwxr-x 1 root tunnel 151 date and time resolv.conf

Then I run

sudo chown --recursive root:tunnel run/resolvconf
sudo chmod --recursive 775 /run/resolvconf

Then I get this

drwxrwxr-x 3 root tunnel 100 date and time .
drwxr-xr-x 33 root root 860 date and time …
-rwxrwxr-x 1 root tunnel 0 date and time enable-updates
drwxrwxr-x 2 root tunnel 40 date and time interface
-rwxrwxr-x 1 root tunnel 151 date and time resolv.conf

but after few second or reboot all is OVERWRITTEN flags and file resolv.conf and I get this again

ls -al /run/resolvconf
total 4
drwxrwxr-x  3 root tunnel 100 date and time .
drwxr-xr-x 33 root root   860 date and time ..
-rw-r--r--  1 root root     0 date and time enable-updates
drwxrwxr-x  2 root tunnel  40 date and time interface
-rw-r--r--  1 root root   151 date and time resolv.conf

and I cant chattr

chattr: Operation not supported while reading flags on /etc/resolv.conf

here is cat for resolv.conf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND – YOUR CHANGES WILL BE OVERWRITTEN
2

As it's written the resolv.conf file is overwritten each times you start or restart the network manager demon

If you want to keep a static DNS you've to add this line in you /etc/network/interfaces file :

dns-nameservers xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx

In my example you've to replace xxxx.xxxx.xxxx.xxxx by the IP address of the desired DNS. You could put 8.8.8.8 and 8.8.4.4 which is the DNS of Google as example.

Regards,

0

The /etc/resolv.conf is just a symbolic link , because you have resolvconf package installed on your system the default ls -al /etc/resolv.conf :

/etc/resolv.conf -> /etc/resolvconf/run/resolv.conf

That's why your recive chattr: Operation not supported while reading flags on /etc/resolv.conf error.

Remove the /etc/resolv.conf then create it again.

rm /etc/resolv.conf # or use unlink command
nano /etc/resolv.conf # etdit your file
chattr +i /etc/resolv.conf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.