Xref: utzoo comp.unix.wizards:22966 alt.security:1131 Path: utzoo!attcan!uunet!cs.utexas.edu!rutgers!news-server.csri.toronto.edu!torsqnt!lethe!yunexus!shields From: shields@yunexus.YorkU.CA (Paul Shields) Newsgroups: comp.unix.wizards,alt.security Subject: Re: Hard links to directories: why not? Summary: You haven't lived until you've tried this. Keywords: ln, directories, security... Message-ID: <12877@yunexus.YorkU.CA> Date: 19 Jul 90 04:26:33 GMT References: <5222@milton.u.washington.edu> Organization: York U. Computing Services Lines: 32 wiml@milton.u.washington.edu (William Lewis) writes: > In the man entry for ln(1) (and for link(2)), it says that >hard links may not be made to directories, unless the linker is >the super-user (in order to make '.' and '..', I suppose). My >question is: why not? (and is there any reason that I, if I'm >root, shouldn't do this?) Imagine the fun a user could have with the following: % ln . foo % ln .. bar It would annoy a lot of the utilities you might like to run, like du, ls -R, etc. >It seems perfectly harmless to me, although >it would allow the user to make a pretty convoluted directory structure, >that's the user's priviledge. So I suppose it's probably a security >issue somehow (restrictions of this sort seem to be). Hence the >crosspost to alt.security. Well, perhaps the following could be hazardous: # rm -r bar Just a thought. -- Paul Shields shields@nccn.yorku.ca P.S: on VAX/VMS 3.7 the above (with a different command set of course) is possible. I don't know about old versions of UNIX.