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

ridehard

macrumors member
Original poster
Feb 11, 2008
63
0
Portugal
Hi there,

Today i was my university and started to think that maybe someone could be seeing my files. When i got home, cliked "get info" from my mac Harddrive root and set the permission from everyone (read) to no access.
Leopard does not boot, disk utility gives me errors, does not repair disk.

I have all my university works on my mac, projects for this week.

Can anyone help me please ?

Thank you
 
Yeah... you basically just told your Mac that nothing is allowed to use your hard drive. I'm at a loss of what to do aside from bringing it in to an Apple store and begging them for help and forgiveness.
 
ok there is a couple of things to do. one try using the disk to run disk utilities as the poster above sugest. or if you have a friend with a mac and a firewire cable put your computer into target disk mode and it should show up a a drive plug it into your friends mac. then change permissions back on the disk.
 
Ok have you run the disk utility app on the Leopard installation DVD? Rather than the one on your hard drive.

I've tried that. Does not help. The repair verify permissions gives me : "Error: The underlying task reported failure on exit".
 
Hi there,

Today i was my university and started to think that maybe someone could be seeing my files. When i got home, i "get info" from my mac Harddrive root and set the permission from everyone (read) to no access.
Leopard doen not boot, disk utility gives me errors, does not repair disk.

I have all my university works on my mac, projects for this week.

Can anyone help me please ?

Thank you

A word to the wise: don't do that again, just disable file sharing. Disabling read permissions for the world will kill the system (as you found out) because few/none of the system services will start (they all run under various users) and your user will not be able to accessanything either.
Optimal method
  • Get your system disk and boot off of it
  • Under the "Utilities" menu (might be under a different name) select "Disk Utility"
  • Click on your main drive and hit the "Repair Permissions" button


Edit:
If anyone else runs into this issue, do not follow these instructions as they break the system under Leopard's new security setup! The correct solution is several posts down

Quick but dirty method
Reboot the system and hold down Command-S
Then type in (verbatim!)
Code:
/sbin/fsck -y
/sbin/mount -uw /
/bin/chmod -Rh 777 /
/sbin/shutdown -r now

Once the system starts immediately open the terminal and type (again, exactly as you see!):
Code:
sudo /usr/sbin/diskutil repairPermissions /
 
Hello Guiyon,

Code:
/sbin/fsck -y
/sbin/mount -uw /
/bin/chmod -Rh 777 /

error: chmod: the -R and -h options may not be specified together.

and now ?
 
Hello,

Code:
/sbin/fsck -y
/sbin/mount -uw /
/bin/chmod -Rh 777 /
error: chmod: the -R and -h options may not be specified together.

and now ?

Edit:
If anyone else runs into this issue, do not follow these instructions as they break the system under Leopard's new security setup! The correct solution is several posts down

Forgot about that restriction; just scratch the '-h' option, it's not really all that important. Just so you know what each command is doing (just in case!):
Code:
/sbin/fsck -y
Usually done by the system during a normal boot. It performs an integrity check on the filesystem and attempt to repair any errors it finds

Code:
/sbin/mount -uw /
This command mounts the root partition in read-write mode. The root drive is mounted Read-Only by default since running fsck on a drive mounted in Read-Write mode can be hazardous to both your health and the drive's. Since we ran fsck in the previous command, we can go ahead and tell the system that the drive can now be safely mounted RW.

Code:
/bin/chmod -R 777 /
This is the real guts here. This tells the system to go ahead and enable the Read (4), Write (2) and Execute (1) bit for the User (first 7, 4+2+1 = 7), Group (the second 7) and world (third 7). The '-R' option tells chmod to recursively set the permissions on each file/folder in the hierarchy below the passed directory (in this case '/').
 
chmod: /dev: permission denied
chmod: /dev/fd: permission denied
chmod: /dev/fd/4: bad file descriptor
chmod: /system/library/coreservices/boot.efi: operation not permitted
chmod: /system/library/coreservices/bootX: operation not permitted

still running i can hear the HDD
 
chmod: /dev: permission denied
chmod: /dev/fd: permission denied
chmod: /dev/fd/4: bad file descriptor
chmod: /system/library/coreservices/boot.efi: operation not permitted
chmod: /system/library/coreservices/bootX: operation not permitted

still running i can hear the HDD

That should be fine; chmod will just yell and then ignore the files. chmod tends to flip out when setting the permissions on device and special files (not all of these support permissions). Also, just in case you missed my additional note in the mess of a post above, after chmod finishes (the prompt will reappear), type
Code:
/sbin/shutdown -r now
to reboot the system.
 
Guiyon,

did exactly what you said.
Takes a very long time to boot, from the first gray screen, and then goes black screen and reboot's its self!

=(
 
Guiyon,

did exactly what you said.
Takes a very long time to boot, from the first gray screen, and then goes black screen and reboot!

=(

Hrm, sounds like there may be more than a permissions error going on here. Let me try replicating the issue on my laptop and see if I can get to the same point. Try holding down Command -V (this will boot the system in verbose mode) and see if the system reports any errors before restarting (note: a LOT of text will appear, just look for anything that seems to indicate a failure or panic).

What computer are you posting from, by the way?
 
Hrm, sounds like there may be more than a permissions error going on here. Let me try replicating the issue on my laptop and see if I can get to the same point.

Guiyon,

I set my mac HDD from everyone (read) to no access.

And then went to my leopard dvd, ran disk repair and permission repair(giving me and error)

And then searched for 2h.

Posted here.
 
What computer are you posting from, by the way?

From my AMD barton desktop. Win Xp

Stays a very long time on: AppleintelCPUPowerManagement: Initialization complete

and then
sync disks ... killing all processes
continue

reboot

all very fast
 
I'm running the commands on my laptop now and I ran into the same issue; checking out the reason for failure.

Edit: Found the issue. With Leopard's new security system it thinks the '777' permissions on its boot files are the result of a hacking attempt and skips them :/

Should have a solution in a few minutes; I liked it more when the system just did what it was told, not what it thought it should do.
 
I'm running the commands on my laptop now and I ran into the same issue; checking out the reason for failure.

Edit: Found the issue. With Leopard's new security system it thinks the '777' permissions on its boot files are the result of a hacking attempt and skips them :/

Should have a solution in a few minutes; I liked it more when the system just did what it was told, not what it thought it should do.

Guiyon,

Thank you so much for helping me!, just dont damage your laptop over me please :p

Guiyon,
You have fixed this error i was getting in disk utility under repair permissions.
"Error: The underlying task reported failure on exit".
Its asking for 1h and climbing to repair.
 
Meh, it's just software; it's a trivial task for me to backup my files and restore the system if I do too many bad things to my install. Besides, no one ever learned anything by succeeding :)

Almost got a solution for ya, the system is booting now just trying to ungum the security system which thinks someone is trying to break in.
 
Meh, it's just software; it's a trivial task for me to backup my files and restore the system if I do too many bad things to my install. Besides, no one ever learned anything by succeeding :)

Almost got a solution for ya, the system is booting now just trying to ungum the security system which thinks someone is trying to break in.

ahaha excellent.
Guiyon, yes its just software but... i dont even know why i did that, im new to macs, have mine for about 6months.
All my University files and projects are on my mac, so i stressed. Not the most intelligent thing to do i know :(
Just wish everything went back to like it was.
 
ahaha excellent.
Guiyon, yes its just software but... i dont even know why i did that, im new to macs, have mine for about 6months.

It happens to the best of us; I've done some stupid things in the past as well that have been considerably more destructive than a (relatively) simple permission fix (Used the wrong device name on dd while using /dev/random, aka: scribbling random data all over my drive). That's why I stressed my system; some of the thing I just tried probably shouldn't be done by any sane person :). Completely forgot about the setuid bits on things such as sudo, etc. Anyway, I do have a solution for you, just double checking it at the moment to make sure it goes smoothly, unlike my last attempt...
 
That's why I stressed my system; some of the thing I just tried probably shouldn't be done by any sane person :). Completely forgot about he setuid bits on things such as sudo, etc. Anyway, I do have a solution for you, just double checking it at the moment to make sure it goes smoothly, unlike my last attempt...

Ok thank you Guiyon im sorry if your system is a bit on the crazy side now, because of you helping me.

After all your work, really hope its works :)
It is Nice to speak with someone who really know what they are saying
 
And here we go. I am running diskutil (from the terminal, at least) at the moment.

Solution:
For the last time, hopefully, start the system in single-user mode (Command - S)
Note: the first chmod will bitch and moan like usual on the EFI and /dev files
Code:
/sbin/fsck -fy
/sbin/mount -uw /
/bin/chmod -R 777 /
/bin/chmod -R 755 /usr /bin /sbin /etc /private /System /Library
/bin/chmod 775 /var/run
/bin/chmod 1775 /cores
/bin/chmod 1777 /tmp /var/tmp
/bin/mv /usr/bin/login /usr/bin/login.failed
/bin/chmod 4755 /usr/bin/sudo
/bin/chmod 0440 /private/etc/sudoers
exit

Once the system boots up, open /Application/Utilities/Terminal and type:
Code:
sudo /usr/sbin/diskutil repairPermissions /
chmod 4555 /usr/bin/login.failed
chmod 4555 /usr/bin/rlogin
mv /usr/bin/login.failed /usr/bin/login

The repair permissions will probably take a while to complete so just let it do its thing; it will be VERY verbose because there will be tens of thousands of permission errors...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.