From: "Christopher J. Mattern" <syscjm@gwis2.circ.gwu.edu>
Subject: Re: Performing hard links to directories
Date: 1999/02/25 [thread overview]
Message-ID: <hAcB2.219$aF3.1219@fozzy.nit.gwu.edu> (raw)
In-Reply-To: slrn7d9ac2.prl.float@interport.net
In comp.security.unix void <float@interport.net> wrote:
> On Wed, 24 Feb 1999 18:01:47 GMT, Olivier ROBERT
> <olivierrobert@minitel.net> 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.
NO. You haven't read his post all the way through. He wants to hard
link because he wants to create two sets of permissions for the directory.
THIS WILL NOT WORK. Permissions are stored in the i-node, not the
directory entry. Both hard links will always have the same permissions,
and he can't change that. Therefore, DON'T DO IT. It's dangerous and
it won't do what the original poster wants it to do.
As a general rule, you rarely need to hard link anything and you *never*
need to hard link directories. Use symbolic links instead--which won't
do what the original poster needs, but then neither would the hard link.
Look into ACLs (Access Control Lists). They are designed to accomplish
exactly what original poster wants to do and are supported on many unixen
these days.
Chris Mattern
next prev parent reply other threads:[~1999-02-25 5:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-24 5:00 Performing hard links to directories Olivier ROBERT
1999-02-24 5:00 ` Michael Tosch
1999-02-24 5:00 ` Ron Dilley
1999-02-26 5:00 ` Olivier ROBERT
1999-02-26 5:00 ` Tony Fitzgerald
1999-02-25 5:00 ` void
1999-02-25 5:00 ` Nick Maclaren
1999-02-25 5:00 ` Christopher J. Mattern [this message]
1999-02-26 5:00 ` Olivier ROBERT
1999-02-26 5:00 ` Alan J Rosenthal
-- strict thread matches above, loose matches on Subject: below --
1999-02-26 5:00 Tony Langdon
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox