Subj : Re: hardlink not working with directories on same file system To : alt.comp.linux,alt.comp.os.linux,comp.os.linux From : efflandt Date : Wed Oct 27 2004 12:28 am On Tue, 26 Oct 2004, Mark Hobley wrote: > I am trying to create a hard link to the directory /mnt/vol1a/www/donk/ > into /mnt/vol1a/home/donk: > > su root > cd /mnt/vol1a > 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 > cd / > 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. > > What is going on ? > > cat /etc/mtab reveals: > > /dev/hda6 /mnt/vol1a ext2 rw 0 0 > > A hard link is required because user donk is chrooted to /mnt/vol1a/donk/ > > Thanks in advance to anyone who can help. Just a guess, but have you tried "su -"? "su root" retains the environment of the user you su'd from. "su -" makes it a root login shell, with root's env. Otherwise it may be a limitation of the OS or filesystem. .