12 Replies Latest reply: Apr 18, 2013 12:10 PM by rccharles
nfswaa Level 1 Level 1 (0 points)

So the idiot me was trying to fix the permission of my trashcan so it works properly again, but i ended up missclicking and didn't realize that I told BatChmod to work on my entire hard drive. Now I can't boot up anymore, stucks at the Apple logo with the spinning loading, and booting up on windows to find a solution?

 

Any thoughts?


MacBook Pro (13-inch Mid 2010), Mac OS X (10.7.5)
  • baltwo Level 9 Level 9 (61,945 points)

    Boot into recovery mode and restore the OS. Then, restore the home folder's permissions and ACLs. Finally, delete BatChmod.

     

    1. Restart Lion holding down CMD+R.
    2. This brings up the Repair Utilities screen. On top, in the Menu Bar click the Utilities item then select Terminal.
    3. In the Terminal window, type resetpassword and hit the return key.
    4. The Password reset utility launches, but you’re not going to reset the password. Instead, click on the icon for your Mac’s hard drive at the top. From the drop-down below it, select the user account where you are having issues.
    5. At the bottom of the window, you’ll see an area labeled ‘Reset Home Directory Permissions and ACLs’. Click the Reset button there.

     

    The reset process takes a couple of minutes. When it’s done, quit the programs you’ve opened and restart your Mac. Notice that ‘Spotlight’ starts re-indexing immediately.

  • varjak paw Level 10 Level 10 (169,830 points)

    You don't think booting from the recovery partition and repairing permissions from Disk Utility would work? The reset of the home directory permissions would also be necessary, of course, but it would seem to me that a permissions reset should repair the problems. I could easily be wrong, though.

     

    Regards.

  • nfswaa Level 1 Level 1 (0 points)

    Thanks for helping!

     

    I tried to do what you asked, but there are 2 problems. First, when I click on the startup drive, the ultility can't find any user on the disk, and after I clicked reset the permissions, the ultility keep on running for atleast 15 minutes, then nothing happen.

  • baltwo Level 9 Level 9 (61,945 points)

    varjak paw wrote:

    You don't think booting from the recovery partition and repairing permissions from Disk Utility would work? The reset of the home directory permissions would also be necessary, of course, but it would seem to me that a permissions reset should repair the problems. I could easily be wrong, though.

    AFAIK, repairing disk permissions only repairs those shown in the bom files stored in /var/db/receipts/. None of those deal with what's in the user's home directory.

  • nfswaa Level 1 Level 1 (0 points)

    Do you have any other suggestion apart from the above?

  • baltwo Level 9 Level 9 (61,945 points)

    nfswaa wrote:

    I tried to do what you asked, but there are 2 problems. First, when I click on the startup drive, the ultility can't find any user on the disk, and after I clicked reset the permissions, the ultility keep on running for atleast 15 minutes, then nothing happen.

    Then, you really mucked things up. Do you have a Time Machine backup or bootable clones of your installation before running BatChmod? If not, you might have to start over, reinstalling the OS onto another volume, recreating your admin user account, and then seeing if you can find the missing user account on the hosed volume.

  • a brody Level 9 Level 9 (64,370 points)

    You really need to boot off an external drive with the Option key to fix the problem, and when you do, repair permissions of the internal drive.

  • varjak paw Level 10 Level 10 (169,830 points)

    baltwo wrote:

     

    AFAIK, repairing disk permissions only repairs those shown in the bom files stored in /var/db/receipts/. None of those deal with what's in the user's home directory.

     

    Correct; they don't affect the user's home directory. But I thought a permissions repair might get the system booting, from which point the OP could then use the Reset Home Directory Permissions command, but apparently the system is so messed up that it won't even recognize that a user exists.

     

    Regards

  • rccharles Level 5 Level 5 (6,300 points)

    I advise backup up you home folder if you do not have it already.

     

    If you get the rest of the permissions fixed, you can use the terminal to fix up the home folder permissions.

     

    I do not know lion, but here are fun filled commands.  You may need to add some acl stuff.

     

     

    See if we have the right files.

    find /Users/mac   -exec ls -l  {} \;

     

    with short user name mac give 777 permissions owner group  other read write and execute permissions.

    find /Users/mac   -exec chmod 777  {} \;

     

    Please let use know if you want to take this approach and we can figure out  more detailed info.

     

    Robert

  • nfswaa Level 1 Level 1 (0 points)

    I'll try to do this asap, currently right now I can't because I have to use the com for work.

  • rccharles Level 5 Level 5 (6,300 points)

    See if you can get into single user mode.  This will let you play with permissions & tell use a little bit of the OS works.

     

    This page will tell you how to get into single user mode.

    http://support.apple.com/kb/HT1492

     

    Basically, you hold down the command + s key then  powering on your machine. The command key has a little apple symbol on the lower left. It is between the alt/option key and the space bar. On a PC keyboard, it will be the windows key, I think.  The boot up will take longer than normal.   The filesystem will be checked and repaired.

     

     

    Leopard & beyond you can see the ACL info with these options.  Looks like an upper case O in the options. of course l is a lower case L.


    /bin/ls -leO@ filename

     

     

    .... how to use chmod

    mac $ pwd
    /Users/mac
    mac $ touch testseeit
    mac $ ls -l testseeit
    -rw-r--r--   1 mac  staff  0 Nov 11 23:33 testseeit
    mac $ chmod 660 testseeit
    mac $ ls -l testseeit
    -rw-rw----   1 mac  staff  0 Nov 11 23:33 testseeit
    mac $

    of course for cryptic info...
    man chmod

  • rccharles Level 5 Level 5 (6,300 points)

    You need to get into single use mode for steps one and two that are listed below.

    This page will tell you how to get into single user mode.

    http://support.apple.com/kb/HT1492

     

    Basically, you hold down the command + s key then  powering on your machine. The command key has a little apple symbol on the lower left. It is between the alt/option key and the space bar. On a PC keyboard, it will be the windows key, I think. 

     

    1) ( Do you know Unix. You are in a Unix single user console. )  The setup commands you need should be listed on the screen.  For Mac OS 10.4.11, the commands are:

     

    # follow whatever your startup says.  This is what I have.

    # Type the follow two instructions to access the startup disk in read/write:

    # ( in case of partial success repeat this command until errors go away. )

    /sbin/fsck -fy

    /sbin/mount -uw /

     

    ->You do not need to do this to change permissions.  It starts up more of the OS.

    sh /etc/rc

     

    ->You will probably need to press the return key once the system stops typing.

     

    ->To find out the users on the system type, use the ls command. The l is a lower case L:

    ls /Users

     

    ->One of these accounts will be the administrator.