1820592 Members
1853 Online
109626 Solutions
New Discussion юеВ

chmod on a symbolic link

 
SOLVED
Go to solution
MikeL_4
Super Advisor

chmod on a symbolic link


How do you change permissions on linked files, chmod does not seem to work...

Do I have to change my umask setting, and then delete and redefine the link ??
6 REPLIES 6
Sanjay_6
Honored Contributor
Solution

Re: chmod on a symbolic link

hi,

chmod on a soft link would change the permissins for the file it is linked to.

To change the link permissions delete the link, umask and recreate it.

Both the situations it is one and the same thing.

Hope this helps.

Regds
Robert-Jan Goossens_1
Honored Contributor

Re: chmod on a symbolic link

Hi,

Check A. Clay's answer in next thread.

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

Best regards,
Robert-Jan
Jeff Schussele
Honored Contributor

Re: chmod on a symbolic link

Hi Mike,

Perms & ownership on/of a soft link have no meaning - they're ignored. To change the perms/ownership on the destination just run the chown/chmod upon it directly.
Now hard links are another thing. Changing perms/owner on the link will change it on the destination.
So the key is whether it's a soft or hard link.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Michael Roberts_3
Honored Contributor

Re: chmod on a symbolic link

you _can_ 'chown' a symlink with
chown -h user:group symlinkName

But, as others and the referenced thread say, the mode of a symlink doesn't matter.
etouq ot hguone revelc ton m'i
Geoff Wild
Honored Contributor

Re: chmod on a symbolic link

Yes - it really doesn't matter - as ownership is reflected by the actual location...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
MikeL_4
Super Advisor

Re: chmod on a symbolic link

Thanks