Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!cornell!uw-beaver!tektronix!tekgen!tektools!jerryp From: jerryp@tektools.TEK.COM (Milan Moncilovich) Newsgroups: comp.unix.wizards Subject: Re: symbolic links are a botch (actually, modes of symlinks) Message-ID: <2519@tektools.TEK.COM> Date: Sun, 21-Jun-87 09:47:24 EDT Article-I.D.: tektools.2519 Posted: Sun Jun 21 09:47:24 1987 Date-Received: Tue, 23-Jun-87 01:16:47 EDT References: <7879@brl-adm.ARPA> <2211@bunker.UUCP> <1715@munnari.oz> Reply-To: jerryp@tektools.TEK.COM Organization: Tektronix, Inc., Beaverton, OR. Lines: 35 In article <2075@emory.UUCP> arnold@emory.UUCP (Arnold D. Robbins) writes: > To change the subject slightly; it has always struck me as wierd > that the mode bits on a symbolic link have absolutely no relevance to > anything; if a symlink is created with mode 000, you can still do > a readlink on it! The problem is, I can't come up with decent semantics > for the mode bits. (I.E. I think the current semantics are wrong, but > I can't come up with anything better.) How does the Ninth Edition > handle it? Comments, anyone? In article <1715@munnari.oz> kre@munnari.oz (Robert Elz) writes: >This does mean implementing sensible semantics for most of the sys >calls when applied to symlinks, chmod should work (rather than passing >through), and the modes should mean things. "r" would let you see >the contents of the symlink, "w" allow you to change it, and "x" to >access its value in a path lookup. Can someone explain why symlinks were set up this way (modes ignored)? It's always been a hassle for me, and I don't see much benefit from the behavior. Fr'instance, I like to do a "chmod 311" on my binaries so that, when I do grep blat * in a directory full of shell scripts and binaries, "grep" won't print garbage when it finds a match for "blat" in the middle of a binary file. If I have a symlink pointing to a binary, and the binary doesn't belong to me, a "chmod 311" on the symlink complains "chmod: : Not owner". Why were symlinks set up this way, and why shouldn't they be fixed as Robert Elz suggests? --Jerry Peek uucp-style: {allegra,decvax,hplabs,ihnp4,ucbvax}!tektronix!tektools!jerryp Domain-style: jerryp@tektools.TEK.COM I don't speak for Tektronix or its employees (or even for myself, at 6 AM).