Message from discussion hmmm....should ln work?
From: k...@cs.wcu.edu (mark benedetto king)
Subject: hmmm....should ln work?
Keywords: ln gnu marmosets
Sender: use...@ecsvax.uncecs.edu (News Administrator)
Organization: UNC Educational Computing Service
Date: Wed, 16 Mar 1994 07:52:33 GMT
I ran into a problem w/ln, so before I posted here, I got the very latest
gnu fileutils (3.8.4f), and made them. I'm running a slackware/SLS/me
distribution with a pre-1.0 kernel.
according to ln --help, ln -d (or -F, or --directory) should allow the
superuser to create a hard link to a directory. I need to do this for the
purpose of anonymous ftp ( a chroot("/home/ftp"); is executed for anonymous
users, making symlinks useless ). I'm sure it can be done. It just doesn't
work. The error is "Cannot link foo to bar: Operation not permitted".
Is this a kernel problem, an fs problem (that partition is ext2), or
something completely different?
write a program that changes the source directory's stat.st_mode to that
of a normal file (just or it with 0100000, then and off the 040000...)
links a dest file to it (same inode of course) (via the link() system call),
then changes 'em both to directories once again. Whaddaya think?