Go Back   MacRumors Forums > iPhone, iPod and iPad > iOS > Jailbreaks and iOS Hacks

Reply
 
Thread Tools Search this Thread Display Modes
Old Sep 15, 2009, 11:55 AM   #1
Chizzled
macrumors member
 
Join Date: Jul 2009
/etc/host (Mac users) No permission

Hello,

I followed the steps provided by the Dev team to prepare myself for future jailbreaks, but i do not have permission to save the file i needed to edit.

Link...http://www.saurik.com/id/12#howto

File to edit.../etc/hosts

entered...74.208.105.171 gs.apple.com

I could not save file. I changed permission to read and write, but still do not have permission to save file.

I have Snow Leopard and iTunes 9.

Anybody else have any success?
Chizzled is offline   0 Reply With Quote
Old Sep 15, 2009, 11:56 AM   #2
GoCubsGo
macrumors Nehalem
 
GoCubsGo's Avatar
 
Join Date: Feb 2005
You need to be logged in as root before you can save to that file.
You have to first enable the root user, log out and edit, log out and return to the admin or whatever account you use, and you should be set.
GoCubsGo is offline   0 Reply With Quote
Old Sep 15, 2009, 12:10 PM   #3
jared_kipe
macrumors 68030
 
jared_kipe's Avatar
 
Join Date: Dec 2003
Location: Seattle
Send a message via AIM to jared_kipe
In case you haven't figured this out yet, if you're using the command line to edit the file. Just type in "sudo -s" and enter your password before you try to edit the file with nano or whatever editor you prefer.
jared_kipe is offline   0 Reply With Quote
Old Sep 15, 2009, 12:33 PM   #4
spamdumpster
macrumors 6502a
 
Join Date: Jan 2008
You could also copy the host file to the desktop, edit it there, and then copy it back to /etc. When you do that, the computer will ask for your password to authenticate and you'll be all set.
spamdumpster is offline   0 Reply With Quote
Old Sep 15, 2009, 12:36 PM   #5
Chizzled
Thread Starter
macrumors member
 
Join Date: Jul 2009
Done!

Thanks you guys,

I went ahead and edited the file under root user. To enable root user with Snow Leopard, follow the steps in the provided link...

http://stringfoo.com/2009/09/07/tuto...-snow-leopard/

When I opened the 'hosts' file, it automatically opened a 'hosts copy' file. I could not edit the original 'hosts' file. Instead, I edited the 'hosts copy' file, erased the original 'hosts', then renamed the 'hosts copy' to 'hosts.'

Seems to work just fine.

Hope this helps someone else as well.

Thanks again for your super fast replies!!
Chizzled is offline   0 Reply With Quote
Old Sep 15, 2009, 12:49 PM   #6
ViViDboarder
macrumors 68040
 
ViViDboarder's Avatar
 
Join Date: Jun 2008
Location: USA
You can also use the command-line and use vi to edit it by doing
Code:
sudo vi /etc/hosts
I believe. I did this when I was trying to make my fake .mac server.
__________________
iMac 21" Late '09 8GB iPhone3G Jailbroken MacbookPro iPod v5.5, Ubuntu x64 tower & EeePC 900, Lenovo T400
WinMatrix Profile | UbuntuForums Profile | XDA Forums
ViViDboarder is offline   0 Reply With Quote
Old Sep 15, 2009, 01:36 PM   #7
dhlizard
macrumors G3
 
dhlizard's Avatar
 
Join Date: Mar 2009
Location: The Jailbreak Community
Just get TextWrangler (for Mac) it's free and does this simply. No terminal, just find the file, touch the pencil, edit and save.
__________________
iPhone 6+ iPhone 5S
iPad 4 iPad Air AppleTV 2
MacBook Pro Two iMacs

Look for me here
dhlizard is offline   0 Reply With Quote
Old Sep 15, 2009, 02:00 PM   #8
badgerman
macrumors 6502a
 
Join Date: Jun 2008
Quote:
Originally Posted by dhlizard View Post
Just get TextWrangler (for Mac) it's free and does this simply. No terminal, just find the file, touch the pencil, edit and save.
How did you find this etc/host file?
badgerman is offline   0 Reply With Quote
Old Sep 15, 2009, 02:19 PM   #9
ViViDboarder
macrumors 68040
 
ViViDboarder's Avatar
 
Join Date: Jun 2008
Location: USA
Quote:
Originally Posted by badgerman View Post
How did you find this etc/host file?
That's the full filepath... /etc/hosts
__________________
iMac 21" Late '09 8GB iPhone3G Jailbroken MacbookPro iPod v5.5, Ubuntu x64 tower & EeePC 900, Lenovo T400
WinMatrix Profile | UbuntuForums Profile | XDA Forums
ViViDboarder is offline   0 Reply With Quote
Old Sep 15, 2009, 02:23 PM   #10
jaikob
macrumors 6502
 
Join Date: Jul 2008
Location: Freeland, MI
Quote:
Originally Posted by ViViDboarder View Post
That's the full filepath... /etc/hosts
technically it's /private/etc/hosts

__________________
iPad 2 64GB White , Mid 2011 iMac 3.4GHz i7 12GB Ram ATI 6970M 2GB Apple SSD + 1TB
jaikob is offline   0 Reply With Quote
Old Sep 15, 2009, 02:25 PM   #11
badgerman
macrumors 6502a
 
Join Date: Jun 2008
Quote:
Originally Posted by ViViDboarder View Post
That's the full filepath... /etc/hosts
How do you find this without terminal, i can not see any folders called etc in finder.

Text Wrangler requires you to find the file...

In terminal I get after typing /etc/hosts

-bash: /etc/hosts: Permission denied
badgerman is offline   0 Reply With Quote
Old Sep 15, 2009, 02:40 PM   #12
badgerman
macrumors 6502a
 
Join Date: Jun 2008
Quote:
Originally Posted by jaikob View Post
technically it's /private/etc/hosts

Cant find that either and in Terminal still get permision error despite enabling acount as root and logging on and off again.

Driving me nutz this. How long have I got to do this? 3GS JB 3.0

Last edited by badgerman; Sep 15, 2009 at 03:00 PM.
badgerman is offline   0 Reply With Quote
Old Sep 15, 2009, 03:40 PM   #13
jared_kipe
macrumors 68030
 
jared_kipe's Avatar
 
Join Date: Dec 2003
Location: Seattle
Send a message via AIM to jared_kipe
Well in finder you can use the menu option Go->GoToFolder
In the popup dialog type "/etc"
The hosts file will be in there.
You can copy paste, but you may end up with bad permissions.

You can right click hosts, and click the little lock icon at the bottom of it, authinticate and then change everyone acces to read/write.


Then edit it with Textwrangler or whatever.
Then change back the privileges if you want to.


OR open terminal and type "sudo nano /etc/hosts" type in password (you won't see your password being typed so do it from memory)

Edit with the keyboard arrows for moving around (no mouse), then press "control+o" then press return (to save the file). And reboot computer.

EDIT: I routinely do this on mac and windows computers to allow a unique name website like blah.local to pass to a specific IP address on my network. This allows for MAMP to prototype websites in different OS/browser combinations even from within a virtual machine.
jared_kipe is offline   0 Reply With Quote
Old Sep 15, 2009, 11:44 PM   #14
Enigmafan420
macrumors 6502a
 
Enigmafan420's Avatar
 
Join Date: Apr 2008
Location: Puget Sound, U.S.A.
Quote:
Originally Posted by jared_kipe View Post
Well in finder you can use the menu option Go->GoToFolder
In the popup dialog type "/etc"
The hosts file will be in there.
You can copy paste, but you may end up with bad permissions.

You can right click hosts, and click the little lock icon at the bottom of it, authinticate and then change everyone acces to read/write.


Then edit it with Textwrangler or whatever.
Then change back the privileges if you want to.


OR open terminal and type "sudo nano /etc/hosts" type in password (you won't see your password being typed so do it from memory)

Edit with the keyboard arrows for moving around (no mouse), then press "control+o" then press return (to save the file). And reboot computer.

EDIT: I routinely do this on mac and windows computers to allow a unique name website like blah.local to pass to a specific IP address on my network. This allows for MAMP to prototype websites in different OS/browser combinations even from within a virtual machine.
Okay I just did this (basically) by copying hosts to the desktop, changing the permissions, then using textedit to add the line.

I have a 3GS and 3.0.1. I KNOW I AM NOT SUPPOSED TO UPDATE YET But what do I do now? Should I Sync the phone? I have downloaded the 3.1 ipsw but not installed it yet, and I have set itunes (8.x.x) to not remind me again about the update.

Cheers!
__________________
Mac Mini i7 w/fusion drive, 16 GB and Minstack Max -11" Macbook Air w/4GB and 128GB - iPhone 5S 32GB - iPad 3 LTE 64 GB - TV2 (JB)
Enigmafan420 is offline   0 Reply With Quote
Old Sep 16, 2009, 09:54 PM   #15
Enigmafan420
macrumors 6502a
 
Enigmafan420's Avatar
 
Join Date: Apr 2008
Location: Puget Sound, U.S.A.
Quote:
Originally Posted by Enigmafan420 View Post
Okay I just did this (basically) by copying hosts to the desktop, changing the permissions, then using textedit to add the line.

I have a 3GS and 3.0.1. I KNOW I AM NOT SUPPOSED TO UPDATE YET But what do I do now? Should I Sync the phone? I have downloaded the 3.1 ipsw but not installed it yet, and I have set itunes (8.x.x) to not remind me again about the update.

Cheers!
Anyone?!?

Thanks
__________________
Mac Mini i7 w/fusion drive, 16 GB and Minstack Max -11" Macbook Air w/4GB and 128GB - iPhone 5S 32GB - iPad 3 LTE 64 GB - TV2 (JB)
Enigmafan420 is offline   0 Reply With Quote
Old Sep 16, 2009, 11:26 PM   #16
thelatinist
macrumors 603
 
thelatinist's Avatar
 
Join Date: Aug 2009
Location: Connecticut, USA
In my opinion, the easiest way to edit hosts is to open terminal and type:

Code:
sudo nano /etc/hosts
Edit the file, save (ctrl + o) and exit (ctrl + x).

Quote:
Originally Posted by Enigmafan420 View Post
what do I do now? Should I Sync the phone? I have downloaded the 3.1 ipsw but not installed it yet, and I have set itunes (8.x.x) to not remind me again about the update.
You don't need to do anything else. Now if you need to restore, you can do so using the 3.0 ipsw.

And feel free to sync your iPhone as long as you are very careful not to upgrade.
__________________
Late 2008 (Penryn) 13" White MacBook 2.4 GHz Core2Duo, 4 GB Ram, Samsung 840p SSD; iPhone 4S 64 GB, AppleCare+
thelatinist is offline   0 Reply With Quote
Old Sep 17, 2009, 03:12 PM   #17
Enigmafan420
macrumors 6502a
 
Enigmafan420's Avatar
 
Join Date: Apr 2008
Location: Puget Sound, U.S.A.
Quote:
Originally Posted by thelatinist View Post
In my opinion, the easiest way to edit hosts is to open terminal and type:

Code:
sudo nano /etc/hosts
Edit the file, save (ctrl + o) and exit (ctrl + x).



You don't need to do anything else. Now if you need to restore, you can do so using the 3.0 ipsw.

And feel free to sync your iPhone as long as you are very careful not to upgrade.
Okay done all this-thanks for the info. However, does doing this step mean I can restore 3.X AUTOMATICALLY? I thought that something had to be stored on Suarik's server and as far as I know, I have not stored the ECID there.

Cheers!
__________________
Mac Mini i7 w/fusion drive, 16 GB and Minstack Max -11" Macbook Air w/4GB and 128GB - iPhone 5S 32GB - iPad 3 LTE 64 GB - TV2 (JB)
Enigmafan420 is offline   0 Reply With Quote
Old Sep 17, 2009, 04:16 PM   #18
dhlizard
macrumors G3
 
dhlizard's Avatar
 
Join Date: Mar 2009
Location: The Jailbreak Community
Quote:
Originally Posted by badgerman View Post
How did you find this etc/host file?
I enabled show hidden files so it would show up.
__________________
iPhone 6+ iPhone 5S
iPad 4 iPad Air AppleTV 2
MacBook Pro Two iMacs

Look for me here
dhlizard is offline   0 Reply With Quote

Reply
MacRumors Forums > iPhone, iPod and iPad > iOS > Jailbreaks and iOS Hacks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
How to host a photo blog on your Mac? dingdongbubble Mac Basics and Help 8 Aug 17, 2013 04:58 PM
Getting Permission for My Vista External Harddrive Using My Mac BenniBee Windows, Linux & Others on the Mac 1 Mar 13, 2013 08:46 PM
Help! Make your Mac a FTP Host LittleApple08 Mac Basics and Help 0 Jan 3, 2013 02:16 PM
Mac says i don't have permission to update software, please help!?! pleazehelp MacBook Pro 1 Dec 31, 2012 02:41 AM

Forum Jump

All times are GMT -5. The time now is 03:13 AM.

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

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