Go Back   MacRumors Forums > Apple Hardware > Notebooks > MacBook Pro

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 29, 2012, 02:29 PM   #1
okizen
macrumors member
 
Join Date: Jan 2012
How do I set permissions in Hosts

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?
__________________
17" Macbook Pro Antiglare 2.5Ghz, 512GB SSD, updated to 16GB 1333 MHz DDR RAM

17" Sager NP9280 3.33GHz with 6GB 1333 MHz DDR3 RAM, 3x500 GB internal HDs
okizen is offline   0 Reply With Quote
Old Mar 29, 2012, 02:30 PM   #2
simsaladimbamba
Guest
 
Join Date: Nov 2010
Location: located
Mac OS X - Setting Permissions
simsaladimbamba is offline   0 Reply With Quote
Old Mar 29, 2012, 02:39 PM   #3
Ccrew
macrumors 68020
 
Join Date: Feb 2011
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.
Ccrew is offline   0 Reply With Quote
Old Mar 29, 2012, 05:00 PM   #4
okizen
Thread Starter
macrumors member
 
Join Date: Jan 2012
Quote:
Originally Posted by Ccrew View Post
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?
__________________
17" Macbook Pro Antiglare 2.5Ghz, 512GB SSD, updated to 16GB 1333 MHz DDR RAM

17" Sager NP9280 3.33GHz with 6GB 1333 MHz DDR3 RAM, 3x500 GB internal HDs
okizen is offline   0 Reply With Quote
Old Mar 29, 2012, 07:08 PM   #5
Ccrew
macrumors 68020
 
Join Date: Feb 2011
Quote:
Originally Posted by okizen View Post
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.
Ccrew is offline   0 Reply With Quote
Old Mar 29, 2012, 10:10 PM   #6
nudoru
macrumors member
 
Join Date: Feb 2012
Other than permissions - there's a handy app called Gas Mask that makes editing the hosts file a snap.

http://www.macupdate.com/app/mac/29949/gas-mask
nudoru is offline   0 Reply With Quote
Old Apr 3, 2012, 01:42 AM   #7
okizen
Thread Starter
macrumors member
 
Join Date: Jan 2012
Quote:
Originally Posted by nudoru View Post
Other than permissions - there's a handy app called Gas Mask that makes editing the hosts file a snap.

http://www.macupdate.com/app/mac/29949/gas-mask
Thanx nudoru. I'll give Gas Mask a try.
__________________
17" Macbook Pro Antiglare 2.5Ghz, 512GB SSD, updated to 16GB 1333 MHz DDR RAM

17" Sager NP9280 3.33GHz with 6GB 1333 MHz DDR3 RAM, 3x500 GB internal HDs
okizen is offline   0 Reply With Quote
Old Nov 28, 2012, 03:05 PM   #8
gurdjiev
macrumors newbie
 
Join Date: Nov 2012
Quote:
Originally Posted by nudoru View Post
Other than permissions - there's a handy app called Gas Mask that makes editing the hosts file a snap.

http://www.macupdate.com/app/mac/29949/gas-mask
Also having a problem with permissions (as administrator) for the hosts file. Seems like Gas Mask has done just what I expected and it took less time than to log in and write this reply. Thanks a lot for the software tip.
gurdjiev is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Hardware > Notebooks > MacBook Pro

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Terminal Command to Set File Permissions SahtuDEC Mac OS X Server, Xserve, and Networking 3 Feb 28, 2014 01:24 AM
OS X 10.8.5 can't set permissions for external hard drive. frnc OS X 11 Feb 18, 2014 05:06 AM
Hosts file? ifred1 OS X 10.8 Mountain Lion 12 Sep 2, 2013 03:59 PM
iCal Server culls pre-set delegate permissions, why?? -scott- Mac OS X Server, Xserve, and Networking 0 Apr 24, 2013 02:20 AM
General: TinyUmbrella v6.00.01 Set Hosts To Cydia On Exit Greyed Out? BobbyMez09 Jailbreaks and iOS Hacks 3 Oct 30, 2012 03:52 PM

Forum Jump

All times are GMT -5. The time now is 01:33 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC