0

I edited /etc/resolvconf.conf a few weeks ago to add this line:

name_servers="1.0.0.1 2606:4700:4700::1111,2606:4700:4700::1001"

Today, I went back to edit it again, and sudo vim /etc/resolvconf.conf opens the file read-only and overriding with w! fails. I tried su, and sudo sh -c "vim /etc/resolvconf.conf", and nothing's working.

ls -l /etc/resolvconf.conf
-rw-r--r-- 1 root root 320 Jan  4 00:05 /etc/resolvconf.conf

What's happening here? How is this possible?

  • Maybe your whole filesystem is mounted read-only? – eblock Jan 23 at 10:51
  • Is the root partition mounted read-only? – Kusalananda Jan 23 at 10:51
4

Hope the file is set with the immutable flag

To check :

lsattr /etc/resolvconf.conf

----i---------- /etc/resolvconf.conf

To remove immutable flag

chattr -i /etc/resolvconf.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.