Cannot create folder in /home

Discussion in 'macOS' started by BIGBLU, Nov 8, 2007.

  1. BIGBLU macrumors newbie

    Joined:
    Nov 8, 2007
    #1
    Hi guys,

    I just upgraded to Leopard recently and the first thing I noticed was that it simply deleted my /home/www folder without asking me first. Now I wanted to recreate it, but it doesn't work:

    Code:
    g5:/ mw$ cd /home
    g5:home mw$ mkdir www
    mkdir: www: Input/output error
    g5:home mw$ sudo mkdir www
    mkdir: www: Input/output error
    g5:home mw$ sudo rm -R /home
    rm: /home: Resource busy
    Does anyone have an idea what is going on and how I could get back to using /home/www for my local web site hosting? This would be very convenient for me since I use the same folder structure on my productive web server.

    Thanks a lot in advance!

    Best regards

    BIGBLU
     
  2. admiraldennis macrumors regular

    Joined:
    Aug 19, 2002
    Location:
    Boston, MA
    #2
    First of all, the contents of your /home folder were not deleted, just obscured by a mountpoint.

    Here's what's going on:

    As you may know, with the introduction of 10.5 Apple completely changed the way filesystems are automounted on the backend. In Leopard, '/home' is reserved for NFS and other network filesystems using autofs.

    What does this mean for you? You should pick another 'www' directory. While /home/www may be the correct location on other operating systems, it is not appropriate on Mac OS X.

    If you want to recover the files previous in your /home directory, this is possible, though somewhat complicated so I will refrain from explaining it unless you need me to.
     
  3. beix macrumors newbie

    Joined:
    Nov 19, 2007
    #3
    You can recover the previous content in the /home folder by doing the following in the terminal:


    su
    mv /home /home_my_last

    Reboot the system, and you should be able to get back everything in it at "/home_my_last" folder.
    Leopard will create a new empty /home.

    I am still in the mid of figuring out how to take back the /home folder, and let Leopard use something like /lhome ...

    --
     
  4. ianm11 macrumors newbie

    Joined:
    Dec 11, 2007

Share This Page