On Thu, May 21, 2009 at 2:47 PM, Juan M. Mendez <vej...@gmail.com> wrote:
> Hello,
>
> I was wondering if current npfs or spfs supports exporting different
> directories, each one with different permissions (protected by
> uid/pass). Is it possible?
>
> My aim is to give users different views of the filesystem of another
> machine, after they authenticate themselves.
>

So -- if I understand you correctly you want to export multiple
subtrees, each subtree potentially protected by a username/password
and not relying on normal file permissions to protect them?

There are several potential approaches to this:

a) different exports for each subtree, or a special hook at mount time
which only allows users to see what they are supposed to see
b) implement some form of ACL (or access to underlying Linux ACL
structures) within 9P or a 9P extension
c) different attach anames for different subtrees, which would allow
you to use the same port, but have to specify mount individually

There are a number of things which would need to be done to support
any of these:

a) spfs/npfs have some support for auth (the only example I know of
being the xcpu style), but you'd probably need to flesh it out more
for your purposes
b) you'd need some sort of /etc/exports like configuration file
specifying the subtrees to export and the users which can see them

Since spfs/npfs are libraries (with ufs being only one
implementation), you could easily take a crack at implementing your
solution (or some subset thereof), but I don't think they currently
have the exact functionality you desire.

   -eric

Reply via email to