Summary: chmod on symbolic links

From: Joel Shandelman FIMS Information Systems - 212-648-4480 (shandelm@jpmorgan.com)
Date: Mon Apr 26 1993 - 22:46:53 CDT


Dear Sun-Managers,

   I'm sorry for the long delay of getting this summary out. Vacation, then
catching up are the main reasons.

I've had many responses to this [elementary] question. The concensus is that
the permission/mode bits on symbolic links are for the most part useless. The
fact that an 'ls -l' will show the modes as 777 are just an outcome of a
decision by the author of 'ls' to either display or not display those bits.
He/She obviously chose to display them even though they are essentially
meaningless. Protection modes for symlinks are controlled by the modes on the
directory which they reside in. If the sticky bit is set on the directory
(by chmod +t) then the link can only be removed by the owner, otherwise,
anyone can remove the link. Even where the link can be removed by anyone, the
file it points to is still protected by standard Unix permissions.

To summarize based on the question I asked, I would just have to add the
sticky bit to the user's own directory, and make sure that the link was NOT
owned by that user. The link is then protected from being deleted.

Thanks to the following people who responded so promptly to my posting.

boole.att.com!tommy <Tommy Reingold>
etnibsd!vsh@uunet.UU.NET
msolda@lamont.ldgo.columbia.edu (m solda)
jaa101@deakin.anu.edu.au (James Ashton)
lincoln!brian@netcom.com
Perry_Hutchison.Portland@xerox.com
Robert L Krawitz <rlk@Think.COM>
weingart@inf.ethz.ch
Steve_Kilbane@gec-epl.co.uk
Dave Mitchell <D.Mitchell@dcs.sheffield.ac.uk>
msd@sharpwa.com (Mark Deason)
Perry_Hutchison.Portland@xerox.com
mks!andy@watserv1.uwaterloo.ca (Andy Toy)
louis@andataco.com
Patrick O'Callaghan <poc@usb.ve>
rauls@usb.ve (LDC - Raul Silvera)
 
----- Begin Included Message -----

> From sun-managers-relay@ra.mcs.anl.gov Mon Mar 29 15:11:29 1993
> Sender: sun-managers-relay@ra.mcs.anl.gov
> Date: Mon, 29 Mar 93 09:49:23 EST
> From: shandelm@jpmorgan.com (Joel Shandelman FIMS Information Systems - 212-648-4480)
> Reply-To: shandelm@jpmorgan.com (Joel Shandelman FIMS Information Systems - 212-648-4480)
> Followup-To: junk
> To: sun-managers@eecs.nwu.edu
> Subject: chmod on symbolic links
>
> Hello sun-managers,
>
> Is there a way to change the modes on a symbolic link to read only so that
> no one could [accidentally] remove it? In practice it seems that any
> manipulation of the symbolic link acts upon the file it points to rather
> that itself (as would be expected). The -R option will not affect the link
> or the file since it doesn't traverse the symlink in that case. I would like
> to have similar functionality without the -R for acting upon single links at
> a time. Thanks.
>
> -- Joel
>

----- End Included Message -----



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:46 CDT