Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!gatech!hao!husc6!cmcl2!brl-adm!adm!rbj@icst-cmr.arpa From: rbj@icst-cmr.arpa (Root Boy Jim) Newsgroups: comp.unix.wizards Subject: symbolic links are a botch Message-ID: <7880@brl-adm.ARPA> Date: Tue, 16-Jun-87 17:14:39 EDT Article-I.D.: brl-adm.7880 Posted: Tue Jun 16 17:14:39 1987 Date-Received: Sun, 21-Jun-87 07:53:41 EDT Sender: news@brl-adm.ARPA Lines: 59 >Symbolic links are mainly a facility to get around certain unix limitations >such as: you can only mount a file system at one mount point at a time (and >hence all the disk space has to be used in one file subtree). It allows >programs with hardcoded pathnames to traverse (one-way) and get to files >even when the sysops need to place the files elsewhere. >-Dave Lennert HP ihnp4!hplabs!hpda!davel This leads to wanting more versions of soft-links: "search order is: soft link only for write, soft link first and hard link second for read" and its 5000 nearly identical brethren. Hey, neat! Let's go to 32 bits for modes! Other rwxrwxrwx values :-) would mean `symbolic write link for owner', `symbolic read link :-) for group', `symbolic execute (or search) link for others', etc. :-) The extra sticky bit would determine whether `..' was `up' or back' :-) The concept of the soft link is a wart on the Unix file system. It is elegant, powerful, and valuable, but a wart none the less. It contravenes the important principle that ". and .. are the only circular links". This principle is an implicit assumption of much of the software on Unix systems and of most of the users. It is often used in ported source code (#include "../h/foo.h" as mentioned above). So is the concept of a hard link. "What, how come my file changed?" "Well, it's a link to this *other* file, and I changed *that* one, and ..." So is the concept of a mounted file system, for that limits hard links. Thus, I am lead to the conclusion that soft-links to directories should be avoided in places where .. is going to be used. It is too likely to cause problems that are hard to notice and diagnose. Caution is advised. The only system that I have access to that provides soft links specifies that soft links to a directory may only be done by the super-user. Too cautious. It would appear that other people have come to the same conclusion. (I presume that this is a standard restriction on all systems with soft links. If not, then perhaps it should be.) It is not. I will agree that there are some semantic areas of symlinks that have not been fully addressed. I would like to see an extensive paper written on all the options and choices made regarding symlinks. Some of these seem to be made on an ad hoc basis. Some programs know about them, some don't. What decisions were made and why? --------- .signature eater food --------- John Macdonald UUCP: {mnetor,utzoo} !spectrix!jmm internet:Sorry. We're in range, but we're in no domain. Disc-claimer: (noun) any hack's source directory (Root Boy) Jim Cottrell National Bureau of Standards Flamer's Hotline: (301) 975-5688