Permissions error SNAFU causes Leopard not to boot [solved]
I just went through a nightmare of permissions errors that caused my computer to stop booting for several hours.
I was trying to share my whole hard drive, and not just my home folder. I went to System Preferences > Sharing > File Sharing and added my hard drive as a shared folder. I noticed that all my shared folders had these sharing permissions:
Me: Read & Write
Users: Read & Write
Everyone: Read Only
It freaked me out that everyone would have read access to my drive; this sounded like OS X’s guest access. Furthermore, it wouldn’t let me select no access, so I was worried that my drive was open to the public.
In finder, I used get info and saw similar permissions:
Sharing & Permissions:
System: Read & Write
admin: Read & Write
everyone: Read only
Since it says “Sharing” above it it, I clicked the lock to unlock, authenticated, and changed everyone’s access from “read only” to “no access”. Oops.
Clearly this is for general filesystem permissions and not for AFP file sharing. First, I couldn’t install a software package (it hung on examining additional volumes…). So I tried to reboot, and my computer hung on the grey screen with the little spinny dots circling around themselves. I’d just locked my system out of itself.
I tried booting into single user mode (hold down command S) and running fsck to fix the drive. No dice.
Then I booted with the Leopard install disk. I ran Disk Utility and tried to Repair Permissions. It failed, saying something like “Unsuccessful - an internal command reported failure”. The same thing happened with Check Permissions. Crap.
I tried booting with the Techtool Deluxe CD that comes with Applecare, but apparently this isn’t even compatible with Leopard — it wouldn’t even boot to CD for me, on several tries.
I tried some of the steps from the article Unable to move, unlock, or copy an item in Mac OS X:
cd /Library/Preferences/SystemConfiguration
defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin -bool true
Next it said to run
sh /etc/rc
but in Leopard there is no rc in /etc/. So much for that.
By the way, in the article Troubleshooting permissions issues in Mac OS X, it says
1) open Terminal
2) type: sudo rm -rf.
I don’t care what it says, NEVER RUN THIS COMMAND. That’s the most dangerous command you can run in unix.
Anyway, finally, I took it into my own hands: I booted into single user mode, and typed
chmod -R 777 /
This would recursively give everything access to everything and is the loosest form of permissions I could think of. It would screw up all of OS X’s permissions, but hopefully it would at least give OS X access to the drive again and disk utility could fix them.
Disk utility was able to run and spent a couple hours fixing permissions on the drive. After that I was able to boot again. Yay! I went back and changed the everyone permission on Macintosh HD to read only.
I got several kernel extension errors - OS X complained about not being able to load my MOTUFireWireAudio.kext extension (for my firewire audio interface), LittleSnitch.kext (little snitch), and fusefs.fs (NTFS mounter that parallels uses to mount XP drives). For the kernel extensions, I used terminal and typed:
cd /System/Library/Extensions
The extensions mentioned above had the wrong permissions (still 777). I think this is because they didn’t come with OS X by default so repair permissions didn’t know what to do with them. So I typed:
chmod -R 755 MOTUFireWireAudio.kext/
chmod -R 755 LittleSnitch.kext/
And they worked better. These files are actually OS X packages / directories, hence the trailing slash and the -R flag. My MOTU driver started working but wouldn’t open the configuration application automatically, so reinstalling it and rebooting fixed it.
You can also test your kernel extensions by running:
kextload -t MOTUFireWireAudio.kext
for example. That gave me verbose output that the permissions were wrong.
I reinstalled parallels but fusefs.fs still wasn’t loading. So I typed:
cd /Library/Filesystems
chmod -R 755 fusefs.fs
Reinstalled parallels again, rebooted, and it worked.
I think things are ALMOST back to normal! Jeez. Lesson learned: Don’t freak out if you see “everyone” having “read only” access in sharing system preferences. It refers to linux permissions, not to Mac OS X’s guest file sharing access.
Anyone who wants to expand on how to read the sharing system preferences and tell exactly what you’re sharing and what you’re not, please comment away.
Tuesday 08 Jan 2008 | jordan314 | Computers, OS X, apple, leopard, security, solved
12 Responses to “Permissions error SNAFU causes Leopard not to boot [solved]”
Leave a Reply
You must be logged in to post a comment.
Hi jordan314!
to me happened unfortunately exactly the same on my macbook (os x 10.5.1):
I changed “Sharing & Permissions” for “everyone” to “no access”…
I did what you posted in your blog and went into single user mode and typed/ran:
chmod -R 777 /
Could you please give me more detailed instructions on what to do next (after it changed all files to “read only” the command line reads:
’single user boot - fsck not done’
‘Root device is mounted read-only’
Can you please go more into detail, particularly your following two paragraphs:
“This would recursively give everything access to everything and is the loosest form of permissions I could think of. It would screw up all of OS X’s permissions, but hopefully it would at least give OS X access to the drive again and disk utility could fix them.
Disk utility was able to run and spent a couple hours fixing permissions on the drive. After that I was able to boot again. Yay! I went back and changed the everyone permission on Macintosh HD to read only.”
I hope you can help, as I am sort of desperate.
THANKS A LOT FOR YOUR FEEDBACK.
Andreas
The first thing you need to do in single user mode is type:
fsck -y
Then type:
mount -uw /
Then, type
sudo chmod -R 777 /
The first two lines check the integrity of the disk and mount the drive in write mode, and are what you should run as soon as you start single user mode. Otherwise you won’t be able to make any changes to the disk. I’m not sure if the sudo is necessary at the end but it can’t hurt (as long as you know the password - it may be your administrative password).
I did the same thing.
However, When I try to boot up in single user mode I get:
Could not open file ‘mach_kernel’
Error loading kernel ‘mach_kernel’ (0xe)
One time after a few minutes it rebooted automatically and went into a weird screen where the grey apple flashes to different shapes; a folder, question mark and maybe some other items. They go by very fast.
I would appreciate any suggestions?
Your guide worked like a charm when I did the same thing yesterday - for the exactly same reasons, too!
Thank you very much :D
[...] Permissions Error SNAFU [...]
Hi,
I’m in the same boat as STRIDER. Do you know if he resolved the issue.
Pullin’ my hair out over here,
Wes
AAPLZEN@SBCGLOBAL.NET
Remind me to delete your email from your comment or it will get picked up by spam bots.
Can you boot from the Leopard DVD? Can you run terminal from it and try
sudo chmod -R 777 /
from there?
Hi Jordan,
I am a new Macbook owner and got into the same trouble.
Though i face some problem following your instructions.
I did booted in single mode and typed in
chmod -R 777 /
It took around 2hours to complete this command.
Afterwards it returned to command prompt. i thought the process is over and therefore typed in “exit”, guessing that it will boot into normal mac.
But then it showed warning
’single user boot - fsck not done’
‘Root device is mounted read-only
Could you please explain in detail what to do next, as i am totally new to macbook. Furthermore how to start again after this as you mentioned in your post.
Many thanks in advance for your reply.
Hi,
Thanks for the wonderful post. It worked out for me also.
I tried the part as mentioned by you =
fsck -y
Then type:
mount -uw /
Then, type
sudo chmod -R 777 /
and in the end typed in exit to boot (”exit has to be typed twice)
Thanks “-)
Glad to hear it rajathbk. I would highly recommend repairing permissions after you run the terminal commands and reboot.
aaplzen and strider, did you get your issue straightened out? Please post and let us know what worked/didn’t work for you!
Thanks, Jordan
first day with my new MacBook Pro….switched from windows. Did a get info on Macintosh HD….saw Everyone having Read only access…didnt like that….changed to “no access”….computer DEAD….not very impressed that its this easy to kill. Tried help here but SUDO would not run….some sort of permissions error….I know squat about UNIX…nothing was on it yet so erased the drive and reinstalling MAC OS X now…I’m really dissapointed that something that seems pretty logical and is so easy to do…..click…click….with NO warnings can completelly hose the OS.
Yup, your disappointment is justified. This seems like a pretty big design flaw on Apple’s part given how many people are doing this. It was a lot harder to kill your system in Tiger.