On Tue, Nov 20, 2001 at 02:13:08PM +1300, Adam Warner wrote: > So let's change tack. How would I go about mounting the entire contents > of a remote computer's filesystem and only be able to access the remote > computer's files within subdirectories of that mount point? There would > be no confusion following remote symlinks because I would be only > navigating the remote filesystem within that mount point.
Sounds like a job for chroot, more or less. (Once you chroot a process to the remote /, it'll act just like the remote / is the real /. But you're also locked into the remote /, which may not be what you want.) Another option would be to use relative paths in your symlinks. Instead of linking /home/user1/foo -> /home/user2/bar, link it to ../user2/bar. Or, if both locations are on the same physical partition, you can use hard links to assign multiple directory entries to the same inode. ln requires that you be root to hardlink a directory, but it will do it if you pass a -d. So just what are you ultimately trying to accomplish, anyhow? > BTW Samba does seamlessly follow remote symlinks. Yeah, that's the default. As another poster has pointed out, samba has to do it that way because Windows can't handle a real symlink. Best case, Windows would think it was a small text file whose contents just happen to be a file name (with all the slashes going the wrong way). -- When we reduce our own liberties to stop terrorism, the terrorists have already won. - reverius Innocence is no protection when governments go bad. - Mr. Slippery