Operating System - HP-UX
1844867 Members
2393 Online
110233 Solutions
New Discussion

Re: Hpw to change permissions on symlink

 
SOLVED
Go to solution
Becke
Super Advisor

Hpw to change permissions on symlink


Guys,

What flag do I need to use to change permissions on symlink to 777....I have done man on chmod but I'm unable to determine this..below is what I need to do..current directory is /usr/local/bin
lrwxr-x-- weekly.ksh -> weekly.app.ksh

Now how do i change the permissions to 777 on weekly.ksh without making any changes to weekly.app.ksh...

Cheers
Raf

7 REPLIES 7
Arunvijai_4
Honored Contributor
Solution

Re: Hpw to change permissions on symlink

Hi Raf,

I dont think it is possible to do.

Check my question on the same.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=956122

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
RAC_1
Honored Contributor

Re: Hpw to change permissions on symlink

You can't unless you do that with some C code. man lchmod or something similar.

Else, recreate it. Change umask to whatever you want and create link again.
There is no substitute to HARDWORK
Arunvijai_4
Honored Contributor

Re: Hpw to change permissions on symlink

Hi Raf,

Just a rephrase to my post, I dont think it is possible to do with "chmod".

Check my thread for more information.

-Arun

P.S Zero point please
"A ship in the harbor is safe, but that is not what ships are built for"
Becke
Super Advisor

Re: Hpw to change permissions on symlink


Thanks Arun and Rac for your quick responses, you guys are right I will have to delete the link and change the umask so I can create it with 777 permissions,

Where is the default umask kept in order to create files in hp-ux machines so i can modify that to umask 000 temporarily to give it 777 permissions??? I will change the umask back to its original once I'm finished...please let me know
RAC_1
Honored Contributor

Re: Hpw to change permissions on symlink

From command prompt.
umask 000;ln -s source_file "link_to_be_created"; umask "original umask";ll "link_created"
There is no substitute to HARDWORK
Raj D.
Honored Contributor

Re: Hpw to change permissions on symlink

Raf,

Check ~.profile , for umask , and you cna change accordingly.

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Becke
Super Advisor

Re: Hpw to change permissions on symlink


Thanks Team for your input..

RAC's suggestion worked ie From command prompt.
umask 000;ln -s source_file "link_to_be_created"; umask "original umask";ll "link_created"

This problem has now been resolved...

I will assign points now...

Cheers
Raf