Results 1 to 5 of 5
  1. #1


    Member Since
    Sep 12, 2011
    Posts
    76
    Can't symlink to /home on mac lion
    I'm finding that if I try to symlink to the /home directory, I get an operation not permitted error. That is using MC as root. I have noted that the permissions
    for /home are 555. I'm not an OS guru, and I
    don't want to change permissions if
    1)Changing permissions for /home is a bad idea OR
    2)It would be a bad idea for any other reason.

    My reason for investigating this is that I am attempting to migrate from a linux workstation.
    I have many control (or project) files that have paths with /home/ hard - coded.
    The corrolary on mac lion will be /Users/. Thus, if I could put symlinks in /home,
    those paths should still be valid.

    So: Why the block of symlinking to /home? And what is the use for /home?
    thanks
    tim
    Software developer since 1987, web programmer since
    1996. Linux user since 2000. 2011 mac mini, 8 Gb RAM.

  2. #2

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,737
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    There's no use for /home. OS X, like various other Unix versions, has a unique location for the user. In Linux it's at /home/user, in one of the BSDs (maybe multiple), I believe it is at /usr/home/user and in OS X it's at /Users (see here for more info). This is why it is good practices to use the shorthand "~" or the environment variable $HOME since this will transfer across OSes. Enough of the little lecture though.

    If you are logged in as root, you have full access to the filesystem (I want to caution you about using the root account though since you can inadvertently destroy quite a bit of data with ease). If you're getting the "operation not permitted" error, you don't have proper permissions (which makes me think you don't actually have root privileges). Why not just use sudo?
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  3. #3


    Member Since
    Sep 12, 2011
    Posts
    76
    Quote Originally Posted by vansmith View Post
    There's no use for /home. OS X, like various other Unix versions, has a unique location for the user. In Linux it's at /home/user, in one of the BSDs (maybe multiple), I believe it is at /usr/home/user and in OS X it's at /Users (see here for more info). This is why it is good practices to use the shorthand "~" or the environment variable $HOME since this will transfer across OSes. Enough of the little lecture though.
    I have always use the shorthand '~' and $HOME myself, but unfortunately, I am referring
    to .vim files in which vim has automatically inserted absolute paths.
    Quote Originally Posted by vansmith View Post
    If you are logged in as root, you have full access to the filesystem (I want to caution you about using the root account though since you can inadvertently destroy quite a bit of data with ease). If you're getting the "operation not permitted" error, you don't have proper permissions (which makes me think you don't actually have root privileges). Why not just use sudo?
    Your advice is noted and should be followed by all. I have had the practice of starting
    mc as sudo, make links and then exiting. All beware - don't do as I do, do as vansmith says!

    Code:
    ln -s /Users/tim /home/tim
    fails with
    Operation not supported
    Software developer since 1987, web programmer since
    1996. Linux user since 2000. 2011 mac mini, 8 Gb RAM.

  4. #4

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,737
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    So apparently the home directory is out of bounds even when invoking sudo. Hrmm....

    Take a look here - it's in reference to Leopard but it looks like the file in question is still used in Lion. As always, backup before hand.
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  5. #5


    Member Since
    Sep 12, 2011
    Posts
    76
    Quote Originally Posted by vansmith View Post
    So apparently the home directory is out of bounds even when invoking sudo. Hrmm....

    Take a look here - it's in reference to Leopard but it looks like the file in question is still used in Lion. As always, backup before hand.
    Thanks.
    That did it. However, it will be some time before I can verify if symlinking will
    take care of the path problem in the vim session files. In case it doesn't, I've got
    a python utility that will take modify paths one .vim at a time.
    cheers
    tim
    Software developer since 1987, web programmer since
    1996. Linux user since 2000. 2011 mac mini, 8 Gb RAM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. symlink to Macintosh HD in Volumes
    By mfq in forum OS X - Operating System
    Replies: 2
    Last Post: 06-19-2013, 09:01 PM
  2. Networking Mountain Lion and Vista Home
    By metheone in forum Internet, Networking, and Wireless
    Replies: 3
    Last Post: 10-20-2012, 06:08 PM
  3. Lion Server OS X Home Directory causing login issue
    By JJMac1 in forum Internet, Networking, and Wireless
    Replies: 1
    Last Post: 04-30-2012, 09:00 PM
  4. iTunes staying at home desktop in lion????
    By Ttaylor394 in forum Apple Desktops
    Replies: 0
    Last Post: 10-11-2011, 12:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •