Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

okizen

macrumors member
Original poster
Jan 21, 2012
92
0
I've been trying to edit the host file in private/etc/ but when I try to save the files it says 'You don’t have permission to write to the folder that the file “hosts” is in. How do I set the read/write permission?
 
simsaladimbamba is right on the permissions settings, but I'd just sudo in terminal and edit there without resetting since you really don't need to for what you're doing.

sudo nano /private/etc/hosts

should get you there.
 
simsaladimbamba is right on the permissions settings, but I'd just sudo in terminal and edit there without resetting since you really don't need to for what you're doing.

sudo nano /private/etc/hosts

should get you there.

I've tried 'sudo nano /private/etc/hosts' and this is the response:

sudo: /private/etc/sudoers is mode 0666, should be 0440
sudo: no valid sudoers sources found, quitting
Macs-MacBook-Pro:~ mac$

How should I change the mode to 0440?
 
I've tried 'sudo nano /private/etc/hosts' and this is the response:

sudo: /private/etc/sudoers is mode 0666, should be 0440
sudo: no valid sudoers sources found, quitting
Macs-MacBook-Pro:~ mac$

How should I change the mode to 0440?

Your /etc/sudoers file has somehow got the wrong file permissions. You could fix this using chmod but unfortunately I think you would need to use sudo to do that. So instead, try using Disk Utility in /Applications/Utilities select your HD and chose Repair Disk Permissions from the First Aid tab.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.