* SUMMARY: Symbolic Link Permissions
@ 1997-10-27 15:33 david.w.chapman
0 siblings, 0 replies; only message in thread
From: david.w.chapman @ 1997-10-27 15:33 UTC (permalink / raw)
To: tru64-unix-managers
Original Question:
How do you change the permissions for a symbolic link?
The reason for this question was that we have several links
with lrwxr-xr-x permissions and I was asked how they got
that way. (See response from Dr. Thomas P. Blinn below)
Here is a summary of the responses:
> You don't
> chmod -h user:group filename
(The chmod command on Digital UNIX doesn't have a -h parameter)
> If you're really, really determined then you delete the link, set
> your umask appropriately, and recreate the link.
(I was not able to do this by setting umask)
> You can't. In any case the permissions that apply are those of the file
> that is linked to.
> why would you? the true permissions are the ones on the file, not on the
> link.
> You don't. It's the permissions of the final referenced file that are
> used, not the soft link's.
> You don't. Symbolic links are supposed to always be protected 777 (as you
> see them), all that really matters is the protection of the think at the end
> of the link in terms of access restrictions.
>
> If you look at the chmod(2) reference page (the one for the function, not
> for the command) you'll see this in the description of parameters:
>
> path Specifies the full pathname of the file. If the path parameter
> refers to a symbolic link, the chmod() function changes access
> permissions on the file specified by the symbolic link.
>
> There's also a comment to the effect that some things can be set with
> mknod() that can't be set with chmod(); but I don't think mknod() can be
> used to create a symbolic link, and symlink() doesn't have a way to set
> the mode of the created link.
>
> I have seen situations where symbolic links wind up with a protection other
> than 777, but I think it occurred while tar or some program like it was
> doing a restoration in a context where a umask was in effect. Very weird.
>
> Tom
>
> Dr. Thomas P. Blinn, UNIX Software Group, Digital Equipment Corporation
> 110 Spit Brook Road, MS ZKO3-2/U20 Nashua, New Hampshire 03062-2698
> Technology Partnership Engineering Phone: (603) 884-0646
> Internet: tpb@zk3.dec.com Digital's Easynet: alpha::tpb
> ACM Member: tpblinn@acm.org PC@Home: tom@felines.mv.net
>
> Worry kills more people than work because more people worry than work.
>
> Keep your stick on the ice. -- Steve Smith ("Red Green")
>
> My favorite palindrome is: Satan, oscillate my metallic sonatas.
> -- Phil Agre, pagre@ucsd.edu
>
> Opinions expressed herein are my own, and do not necessarily represent
> those of my employer or anyone else, living or dead, real or imagined.
Thanks to:
Robert L. McMillin (rlm @ syseca-us.com)
Ross (rwa @ cs.athabascau.ca)
Roger (C-Picard @ mail.dec.com)
Dr. Thomas P. Blinn (tpb @ zk3.dec.com)
Alex_Nord @ Jabil.com
Richard Eisenman (eisenman @ tricity.wsu.edu)
beckers @ josephus.furph.com
Bill Smargiassi (bill @ lists.smed.com)
bprigge @ dttus.com
stevev @ hexadecimal.uoregon.edu
Simon Tardell (Simon.Tardell @ physto.se)
Volker Hejny (Volker.Hejny@exp2.physik.uni-giessen.de)
Wesley Darlington (w.darlington @ am.qub.ac.uk)
Petri Kallberg (kallu @ islay.fno.dec.com)
Lars Bro (lbro@dscc.dk)
Thanks again!
Dave Chapman
david.w.chapman@ussev.mail.abb.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-10-27 15:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-10-27 15:33 SUMMARY: Symbolic Link Permissions david.w.chapman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox