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>
email@example.com (m solda)
firstname.lastname@example.org (James Ashton)
Robert L Krawitz <rlk@Think.COM>
Dave Mitchell <D.Mitchell@dcs.sheffield.ac.uk>
email@example.com (Mark Deason)
firstname.lastname@example.org (Andy Toy)
Patrick O'Callaghan <email@example.com>
firstname.lastname@example.org (LDC - Raul Silvera)
----- Begin Included Message -----
> From email@example.com Mon Mar 29 15:11:29 1993
> Sender: firstname.lastname@example.org
> Date: Mon, 29 Mar 93 09:49:23 EST
> From: email@example.com (Joel Shandelman FIMS Information Systems - 212-648-4480)
> Reply-To: firstname.lastname@example.org (Joel Shandelman FIMS Information Systems - 212-648-4480)
> Followup-To: junk
> To: email@example.com
> 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