Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!hp4nl!star.cs.vu.nl!sater From: sater@cs.vu.nl (Hans van Staveren) Newsgroups: comp.protocols.nfs Subject: Re: Why not export /fs /fs/subdir? Keywords: exportfs export mount Message-ID: <10199@star.cs.vu.nl> Date: 14 Jun 91 07:48:07 GMT References: Sender: news@cs.vu.nl Organization: Fac. Wiskunde & Informatica, Vrije Universiteit, Amsterdam Lines: 30 In article felps@convex.com (Robert Felps) writes: > >This may not be the correct group but I thought someone might be able >to answer the question. > >Why can't the following be done? > >EXPORTFS(8) NFS Programmer's Reference EXPORTFS(8) >... >WARNINGS > You cannot export a directory that is either a parent- or a > sub-directory of one that is currently exported and within > the same filesystem. It would be illegal, for example, to > export both /usr and /usr/local if both directories resided > in the same disk partition. It is a lot worse than that. One of the not too widely known facts about the Sun NFS server implementation is that the checking for this sort of access is in the mount daemon, and not in the NFS daemon. This means that when you export /fs/foo where /fs is a filesystem a client can mount /fs/foo and using the NFS handle returned do the NFS equivalent of a cd .. and start running around the rest of /fs. There are more problems, but since it seems that most people believe that subtree exporting actually achieves anything I thought I should warn you. Hans van Staveren Vrije Universiteit Amsterdam, Holland