1832920 Members
2886 Online
110048 Solutions
New Discussion

ln Ownership ??

 
SOLVED
Go to solution
MikeL_4
Super Advisor

ln Ownership ??

Is there a way to change ownership:group on a link ??

Currently have following:
drwxrwxrwx 18 applmgr oaa 1024 Apr 21 2002 tup_oe
lrwxr-x--- 1 root sys 6 Apr 21 2002 tup_oe_107 -> tup_oe

and need to change to match the real directory.

Thanks
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: ln Ownership ??

Remove the link and recreate it while logged in as applmgr.

Pete

Pete
Sridhar Bhaskarla
Honored Contributor

Re: ln Ownership ??

Hi

It does not matter who owns the link. All it counts is the actual file ownership.

If you want to change the link, then do the following.

#rm tup_oe_107
#su - applmgr
$cd /this_directory
$ln -s tup_oe tup_oe_107

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Helen French
Honored Contributor

Re: ln Ownership ??

In link files, you don't need to worry about the ownership/permission of the file. It will check those properties from the original file.
Life is a promise, fulfill it!
James R. Ferguson
Acclaimed Contributor
Solution

Re: ln Ownership ??

Hi:

While the permissions or ownership of a symbolic link don't matter, you *can* change the ownership of the link with 'chown -h':

From the man pages for 'chown':

"By default, the owner or group of the target file that a symbolic link points to is changed. With -h, the target file that the symbolic link points to is not affected."

Regards!

...JRF...
Paul Sperry
Honored Contributor

Re: ln Ownership ??

Using chmod or chgrp on a link will only result in changing the directory it is pointing to. You must delete lhe link and then log in as applmgr and re-create it.
MikeL_4
Super Advisor

Re: ln Ownership ??

I guess I must have another problem then causing my permission problems with the version manager software they are trying to run.
Thanks for your help..