From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10952f,8bebd5e0e8e16277 X-Google-Attributes: gid10952f,public X-Google-Thread: f72b0,8bebd5e0e8e16277 X-Google-Attributes: gidf72b0,public X-Google-Thread: f678f,8bebd5e0e8e16277 X-Google-Attributes: gidf678f,public From: nmm1@cus.cam.ac.uk (Nick Maclaren) Subject: Re: Performing hard links to directories Date: 1999/02/25 Message-ID: <7b3695$nbh$1@pegasus.csx.cam.ac.uk>#1/1 X-Deja-AN: 448249476 References: <36d438f7.12866181@news.unilim.fr> Organization: University of Cambridge, England Newsgroups: comp.unix.misc,comp.unix.osf.misc,comp.security.unix In article , void wrote: >On Wed, 24 Feb 1999 18:01:47 GMT, Olivier ROBERT > wrote: >>Is it possible to create a hard link to a directory? > >Generally, only root is allowed to create hard links to directories, >because with hard links to directories one can potentially make a loop >that unix is not designed to detect. > >Do it as root and do it carefully and you'll be fine. Perhaps. But you had better either check your system out first or like living dangerously. Some systems don't allow even root to link to directories and, in others, critical utilities will go bananas. I can't remember what fsck does. Remember that a LOT of programs and sometimes even parts of the kernel (think pathname resolution for "a/../b") assume that a directory has a single parent, unless it is a mount point. Regards, Nick Maclaren, University of Cambridge Computing Service, New Museums Site, Pembroke Street, Cambridge CB2 3QG, England. Email: nmm1@cam.ac.uk Tel.: +44 1223 334761 Fax: +44 1223 334679