Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 6943

Summary: hardlinking directories isn't permitted
Product: [Retired] Red Hat Linux Reporter: Pekka Savola <pekkas>
Component: fileutilsAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 6.1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-11-12 18:30:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Pekka Savola 1999-11-12 07:24:34 UTC
Hardlinking directories isn't permitted.  You get:

[root@here] ln --directory DIR1 DIR2
ln: cannot create hard link `DIR2' to `DIR1': Operation not permitted

Even though I'm root.

ln --help suggests that it should be possible:
  -d, -F, --directory         hard link directories (super-user only)

I tried is on RH 5.1 and 6.1+rawhide:

Comment 1 Bernhard Rosenkraenzer 1999-11-12 18:30:59 UTC
hardlinking directories is not possible with every filesystem (most filesystems
don't support this actually).
The ext2 filesystem definitely doesn't do hardlinked directories.
What do you need them for?