How to fix Safari cookies logout bug on iPhone firmware 1.1.4
Remember I promised I’d introduce u to the many uses of having SSH and BSD installed on your iPhone. Here’s the first of a bunch of tips and hacks that will make your iPhone experience a lot less frustrating.
The bug:
On 1.1.4 firmware(and possibly 1.1.3), for some iPhone setups, after you log into a website from Safari, when you get back after having closed Safari, it’ll keep ask you to login.
This gets quickly extremely frustrating, and, as you suspect, it’s a bug.
The solution:
Step 1. Use Terminal.app or putty to SSH onto your iPhone. Read more about how to do this over here (remember, the iPhone root password is usually “alpine” ).
Step 2. On your iPhone, run the following commands:
chmod 777 /var/mobile/Library/Cookies/
chmod 666 /var/mobile/Library/Cookies/*
Voila, it should work now.
As an alternative to Step 2 some people have reported that the following is cleaner and more effective(I didn’t test it, the first method works out for me):
chown -R mobile /var/mobile/
PS - here’s a video of doing this. I must mention that the chown -R version that u see right above is superior to changing manually the 2 files in the video.


Hmmm, I wonder why it says “Operation not permitted.” I tried both chmod and chown.
Nack
28 Apr 08 at 8:53 pm
you have to be logged in as root. if you’re logged in as a different user (for instance mobile), you’ll need to add “sudo” (without quotes) before the commands.
for instance:
sudo chmod 777 /var/mobile/Library/Cookies/
(it’ll ask you the root password, which as I said is usually “alpine” without quotes)
Alex
1 May 08 at 9:06 am
it still doesnt work.. it says sudo command not found
rj
4 May 08 at 7:40 pm
then most probably you haven’t installed bsd subsystem. please read this post first
Alex
4 May 08 at 9:52 pm
thank you alex, but i had bsd installed already before trying
chown -R mobile /var/mobile..
help
rj
5 May 08 at 7:33 pm
I just followed the instructions and I am still am having issues logging in. Ugggh, I hope this is fixed soon — killing me.
Mike
16 May 08 at 11:54 am
At first the connection didn’t work with mine (version 1.1.4). I uninstalled and then reinstalled openSsh and reinstalled BSD. After this the connection worked perfectly. Thanks for the info!
Auke
26 May 08 at 7:18 pm
Worked great for me on my iPod touch (16gb)! It had been driving me nuts! Many thanks x
Sass
5 Jun 08 at 11:14 pm
i tried everything and nothing worked. chown gave me a permission error, term wouldn’t allow me access to root, and i couldn’t perform chmod.
what i did find to fix this issue should possibly work without a jailbreak. download iLiberty and refresh. then run the fix mobile permissions. it will reboot the iphone in recovery mode and fix the permissions. then it will restart normally. been working all day for me now.
mouse
21 Jun 08 at 2:07 am
I have the following problem on my friends 8gig which was free’d with liberty.
I can ssh into the phone, but once a connection is established, the moment I start to type the CHMOD command, the iphone closes the connection.
If I leave the connection open without typing anything, the connection is maintained. Any ideas ?
I had no problems making this work on my 16 gig, but this phone is a problem. Both were freed with iliberty and are on 1.4
Paul
22 Jun 08 at 6:49 am
I found another solution that should be suitable to people not having jailbreaked iPhone, and therefore not able to ssh into it.
The culprit file is corrrupted into your backup, so no matter how many time you restore your iphone, it will be restored as-is, and wrong.
The solution is to delete it from your iphone backup before restoring :
Open a terminal window, and type :
grep “Library/Cookies/Cookies.plist” ~/Library/Application\ Support/MobileSync/Backup/*/*
If you have one backup, as most people do, you should have only one line as a result. delete this file from the mentioned directory, and restore again.
Yann
24 Jun 08 at 10:43 pm
Thank you! This was a big help!
lonegungirl
4 Jul 08 at 1:06 pm
I`ll have a iPhone ,16 GB,1.1.4 version,jailbroked.
For many applications I`ll need a 2.0 version but I`m afraid that when I`ll do the upgrade I`ll block the guy.
What is your recommendation?
adrian
1 Aug 08 at 11:05 pm