HUGE problem mac os X

Discussion in 'macOS' started by ridehard, Nov 17, 2008.

  1. ridehard macrumors member

    Joined:
    Feb 11, 2008
    Location:
    Portugal
    #1
    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
     
  2. Schtumple macrumors 601

    Schtumple

    Joined:
    Jun 13, 2007
    Location:
    benkadams.com
    #2
    Do you use time machine? Could do a install from time machine which would reverse any deletions that may have been performed.
     
  3. ridehard thread starter macrumors member

    Joined:
    Feb 11, 2008
    Location:
    Portugal
  4. iToaster macrumors 68000

    iToaster

    Joined:
    May 3, 2007
    Location:
    In front of my MacBook Pro
    #4
    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.
     
  5. Schtumple macrumors 601

    Schtumple

    Joined:
    Jun 13, 2007
    Location:
    benkadams.com
    #5
    Ok have you run the disk utility app on the Leopard installation DVD? Rather than the one on your hard drive.
     
  6. bokdol macrumors 6502a

    bokdol

    Joined:
    Jul 23, 2002
    Location:
    VA
    #6
    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.
     
  7. ridehard thread starter macrumors member

    Joined:
    Feb 11, 2008
    Location:
    Portugal
    #7
    I've tried that. Does not help. The repair verify permissions gives me : "Error: The underlying task reported failure on exit".
     
  8. Guiyon macrumors 6502a

    Joined:
    Mar 19, 2008
    Location:
    North Shore, MA
    #8
    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 /
     
  9. ridehard thread starter macrumors member

    Joined:
    Feb 11, 2008
    Location:
    Portugal
    #9
    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 ?
     
  10. Guiyon macrumors 6502a

    Joined:
    Mar 19, 2008
    Location:
    North Shore, MA
    #10
    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 '/').
     
  11. ridehard thread starter macrumors member

    Joined:
    Feb 11, 2008
    Location:
    Portugal
  12. ridehard thread starter macrumors member

    Joined:
    Feb 11, 2008
    Location:
    Portugal
    #12
    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
     
  13. Guiyon macrumors 6502a

    Joined:
    Mar 19, 2008
    Location:
    North Shore, MA
    #13
    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.
     
  14. ridehard thread starter macrumors member

    Joined:
    Feb 11, 2008
    Location:
    Portugal
    #14
    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!

    =(
     
  15. Guiyon macrumors 6502a

    Joined:
    Mar 19, 2008
    Location:
    North Shore, MA
    #15
    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?
     
  16. ridehard thread starter macrumors member

    Joined:
    Feb 11, 2008
    Location:
    Portugal
    #16
    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.
     
  17. ridehard thread starter macrumors member

    Joined:
    Feb 11, 2008
    Location:
    Portugal
    #17
    re doing your steps

    fsck_hfs: volume is journaled. No checking performed
     
  18. ridehard thread starter macrumors member

    Joined:
    Feb 11, 2008
    Location:
    Portugal
    #18
    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
     
  19. Guiyon macrumors 6502a

    Joined:
    Mar 19, 2008
    Location:
    North Shore, MA
    #19
    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.
     
  20. ridehard thread starter macrumors member

    Joined:
    Feb 11, 2008
    Location:
    Portugal
    #20
    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.
     
  21. Guiyon macrumors 6502a

    Joined:
    Mar 19, 2008
    Location:
    North Shore, MA
    #21
    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.
     
  22. ridehard thread starter macrumors member

    Joined:
    Feb 11, 2008
    Location:
    Portugal
    #22
    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.
     
  23. Guiyon macrumors 6502a

    Joined:
    Mar 19, 2008
    Location:
    North Shore, MA
    #23
    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...
     
  24. ridehard thread starter macrumors member

    Joined:
    Feb 11, 2008
    Location:
    Portugal
    #24
    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
     
  25. Guiyon macrumors 6502a

    Joined:
    Mar 19, 2008
    Location:
    North Shore, MA
    #25
    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...
     

Share This Page