Welcome to Ask Ozar.net !
Welcome to Ask Ozar.net, where you can ask questions and receive answers from other members of the community.
0 votes

I'm struggling to edit my hosts file on my Mac (OS X Yosemite) which is located at /etc/hosts using TextWrangler.

When I open the file first, I receive a dialog box asking "Are you sure you want to unlock "hosts" ? You aren't a member of group wheel."

I click "Unlock".

I edit the file and then try to save, but then I receive another dialog box with an error saying:

This operation couldn' be completed, because an error occurred.

The authenticated save for this file failed (application error code: 200004).

This operation could not be completed, because an error occurred.
Any suggestions to solve this?

in IT / Technical by (560 points)
edited by

1 Answer

0 votes

Following these steps, it should be a snap:

  1. Launch Terminal
  2. Open TextWrangler as sudo by typing the following in one line:
    sudo -b /Applications/TextWrangler.app/Contents/MacOS/TextWrangler /etc/hosts
  3. Make your changes, save your edit and close
by (1.0k points)

Related questions

0 votes
1 answer
+2 votes
2 answers
579 views asked Dec 28, 2013 in Mac OS X by kalderya (260 points)
0 votes
1 answer
+1 vote
2 answers
...