1748215 Members
3367 Online
108759 Solutions
New Discussion юеВ

Re: modifying link

 
SOLVED
Go to solution
Avinash20
Honored Contributor

Re: modifying link

Oops.. Sorry .. Didnt read it carefully

This link currenlty goes to /oracle/KHR
How can I change it to go to /oracle/KTC

So presently

there is a link created for /oracle/KPC:
lrwxr-xr-x 1 orakhr dba 3 Dec 17 15:00 KPC -> KHR

You like file /oracle/KPC to link to /oracle/KTC

# cd /oracle
# rm KPC
# ln -s KTC KPC

With regards to ownership

# chown
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Avinash20
Honored Contributor

Re: modifying link

With regards to ownership

# chown orakhr /oracle/KTC

Please no point for this
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
HPOPSW
Advisor

Re: modifying link

Thanks Avinash, James and Mel for your responses.
James R. Ferguson
Acclaimed Contributor

Re: modifying link

Hi:

> Also how can I change the owner of the link that to oraktc.

Use 'chown -h' [see the manpages for chown()].

Having said that, you should remember that the permissions and/or ownership of a (symbolic) link do not matter. It's the permissions and the ownership of the file or directory to which the symbolic link points that determine access.

Regards!

...JRF...
Avinash20
Honored Contributor

Re: modifying link

Note.. the link file will depend on the ownership of /oracle/KTC though !!
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
James R. Ferguson
Acclaimed Contributor

Re: modifying link

Hi (again):

Using a simple 'chown' (without the -h) on a symbolic link changes the ownership of the thing that the link points to, NOT the ownership of the link itself!

Regards!

...JRF...
HPOPSW
Advisor

Re: modifying link

Thanks all for your valuable help.