New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

Can't symlink to /home on mac lion


Post Reply New Thread Subscribe

 
Thread Tools
timinak

 
Member Since: Sep 12, 2011
Posts: 69
timinak is on a distinguished road

timinak is offline
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.
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,815
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
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
QUOTE Thanks
timinak

 
Member Since: Sep 12, 2011
Posts: 69
timinak is on a distinguished road

timinak is offline
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
Quote:
Operation not supported

Software developer since 1987, web programmer since
1996. Linux user since 2000. 2011 mac mini, 8 Gb RAM.
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,815
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
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
QUOTE Thanks
timinak

 
Member Since: Sep 12, 2011
Posts: 69
timinak is on a distinguished road

timinak is offline
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.
QUOTE Thanks

Post Reply New Thread Subscribe


« RAR files keep failing (CRC failed) | Question about locally backing up Gmail using Thunderbird, while running Apple Mail »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Mac OS X Lion adds new iOS-like About this Mac app the8thark Apple Rumors and Reports 15 02-27-2011 11:34 AM
Need to know how much RAM your Mac can hold? iLaugh Other Hardware and Peripherals 6 12-13-2009 01:49 PM
Mac Users Get More ISP Choices schweb Apple Rumors and Reports 1 03-06-2003 10:57 AM

All times are GMT -4. The time now is 12:36 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?