From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Fri, 22 May 2009 09:02:07 -0500 Message-ID: From: Eric Van Hensbergen To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [9fans] 9p server under GNU/Linux Topicbox-Message-UUID: fc5b4cf6-ead4-11e9-9d60-3106f5b1d025 On Thu, May 21, 2009 at 2:47 PM, Juan M. Mendez 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