TechSpot

My Mac corrupted

By geniusmousa
May 22, 2013
Post New Reply
  1. I have my macbook pro crashed no operating system on it and I would like to get my all data before recovery or they will be lost , what shall I do? and is it possible to connect it to a windows laptop as external harddisk? also I used linux ubuntu and I saw my files but I can't open them the message appears I am not the owner of this folder ,, what can I do ? please help :(
     
  2. jobeard

    jobeard TS Ambassador Posts: 13,426   +317

    If Ubuntu can see them then there is hope :)

    Once you have the Ubuntu desktop and the Mac disk mounted, you need another place to copy the files, so figure that out and mount that device too.

    Get a Terminal window - - (yes, we'll fix the perms with a command line operation)

    In the Terminal window, issue ls -lF (that's lower case 'ell', UC F) and you will see details of the current directory, eg:
    Code:
     $ ls -l
    total 0
    drwxr-xr-x+ 1 Jeff Users 0 May 22 07:44 _test2/
    -rw-r--r--  1 Jeff Users 0 May 22 07:43 bar
    -rw-r--r--  1 Jeff Users 0 May 22 07:43 foo
    -rw-r--r--  1 Jeff Users 0 May 22 07:43 zed
    
    the 3rd column is the OWNER and the 4th is the GROUP.
    the 1st column is the permissions for the owner,group and everyone.

    To traverse the sub directories (shown like line1 with the trailing / ), the perms must
    have the x for all three eg drwxr-xr-x

    Ubuntu mounts devices - -
    There are broadly two approaches -
    You will need to have root perms, so rlogin root or use su root and give the password.

    So use the cd command to put the current directory on the Mac device root and use
    ls -lF to see the user,group being used. As long as every directory shows up like drwxr-xr-x
    then you need only to change either the owner or the group.

    the command you need to change the owner is:
    Usage: chown [OPTION]... [OWNER][:[GROUP]] FILE...​

    and the OPTIONs you need are -hR and the owner would be your Ubuntu login, eg
    chown -hR Jeff .

    there's a trailing space and period after Jeff (that's my Linux login - - use yours).

    when the command completes, use ls -lF to verify it's correct and then terminate your rlogin or su shell.

    With the owner set, you can now use the Linux copy command (cp) or go back to the GUI desktop to manage the Mac file extractions.
     
  3. geniusmousa

    geniusmousa TS Rookie Topic Starter

    First thanks a lot f your reply :)
    2nd can I make that from windows if windows sees my drives but he tells me to format them
    3rd if from ubuntu I use ubuntu from usb so no password or log in name what I do then ?
     
  4. jobeard

    jobeard TS Ambassador Posts: 13,426   +317

    NO NO NO! compatibility issue!
    login on Ubuntu w/o mac drive attached.

    Can you get into the root login? Get the Terminal and enter whoami -- the reply is the current user's Linux ID.

    Then type su root - - can you enter the password and then does whoami reply with root?
     
  5. jobeard

    jobeard TS Ambassador Posts: 13,426   +317

    Btw: Ubuntu has root "disabled" but here's how to enable it.

    get the terminal and issue
    sudo passwd root

    this will then prompt you to create a password for root - - REMEMBER IT!

    the line reads
    • run the sudo command
    • have it run the password command for you
    • and pass 'root' to password
    sudo will terminate when password is complete.

    from there on, you can use Terminal and issue su root and reply with the password.

    CAUTION! do exactly and only what you know or have been given instructions to do. Linux will allow root to eat the system if you are careless.

    After using su root, ALWAYS type exit (or <ctl>d) when you no longer need root authority
     


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.