Subj : Re: hardlink not working with directories on same file system To : alt.comp.linux,alt.comp.os.linux,comp.os.linux From : michael1cat Date : Wed Oct 27 2004 09:28 am From what I've seen on LINUX, it appears even superuser (root) is disallowed from hard linking a directory. This might be considered a good thing, or a bad thing, depending on one's perspective. My guestimate is it was/is a design decision (it may be a matter of libraries/utilities, and not necessarily kernel). I've noted this even when using other UNIX filesystem types that definitely support hard links on directories when mounted on LINUX. strace(1) (or a bit of C programming) can be used to see that it fails and how it in fact fails ... despite what one might expect for superuser (root). For an alternative, you might want to consider doing a --bind mount(1), or possibly rearranging things a bit and using symbolic link(s). markhobley@hotpop.deletethisbit.co.uk (Mark Hobley) wrote in message news:... > I am trying to create a hard link to the directory /mnt/vol1a/www/donk/ > into /mnt/vol1a/home/donk: > > su root > ln www/donk/ home/donk/www > ln: `www/': hard link not allowed for directory > ln -d www/donk/ home/donk/www > ln: creating hard link `home/donk/www' to `www/donk/': > Operation not permitted > ln /mnt/vol1a/www/donk/ /mnt/vol1a/home/donk/www > ln: `/mnt/vol1a/www/donk/': hard link not allowed for directory > ln -d /mnt/vol1a/www/donk/ /mnt/vol1a/home/donk/www > ln: creating hard link `/mnt/vol1a/home/donk/www' to `mnt/vol1a/www/donk/': > Operation not permitted > Documentation seems to suggest that I can hard link directories on the same > file system. > > A hard link is required because user donk is chrooted to /mnt/vol1a/donk/ .