Can't symlink to /home on mac lion

Joined
Sep 12, 2011
Messages
76
Reaction score
1
Points
8
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
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
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?
 
OP
T
Joined
Sep 12, 2011
Messages
76
Reaction score
1
Points
8
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.
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
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
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.
 
OP
T
Joined
Sep 12, 2011
Messages
76
Reaction score
1
Points
8
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
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top