Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to create a hard link to a directory as follows

root@...:/usr/share/tomcat6/logs# ln --directory /usr/share/tomcat6/skel/conf conf

It fails with the following error

ln: creating hard link `conf' => `/usr/share/tomcat6/skel/conf': Operation not permitted

What am I missing? How can I create the equivalent of this directory link?

share|improve this question
Possible duplicate of Why are hard links not allowed for directories? – Amir Ali Akbari Mar 28 at 11:59
up vote 4 down vote accepted

From the manual page of ln:

-d, -F, --directory
allow the superuser to attempt to hard link directories (note: will probably fail due to system restrictions, even for the superuser)

An application cannot see whether a hard link is a hard link or the original file path. If this is not a requirement, you can use symbolic links instead:

ln -s /usr/share/tomcat6/skel/conf conf
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.