After I completed some suggested updates, I have lost the ability to edit the hosts file using sudo. Thus, drush qc does not work, giving the following:

Creating dns config (add atrium.dev to /etc/hosts) ... [ok]
Command failed: [error]
127.0.0.1 atrium.dev #drupalpro

I have tried searches on issues with a locked hosts file to no avail. Any ideas?

Comments

seanhe’s picture

Figured this out myself. The hosts file became "immutable" somehow. Here is how to fix it:

~$ lsattr /etc/hosts
----i--------e- /etc/hosts

If there is an "i" then the file is immutable and the following command will reset that:

~$ sudo chattr -i /etc/hosts

mike stewart’s picture

Status: Active » Fixed

glad you figured it out ... even more awesome you shared!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.