Linux NFS development
 help / color / mirror / Atom feed
From: Asdo <asdo@shiftmail.org>
To: linux-nfs@vger.kernel.org
Subject: How to separate mount rights in nfsv4
Date: Thu, 10 Feb 2011 02:47:00 +0100	[thread overview]
Message-ID: <4D534394.2050404@shiftmail.org> (raw)

Hello,
it's not clear to me how I can allow different access to different
machines in NFSv4.
Because nfsv4 needs a root export with fsid=0, and all other mounts
should be below that.

However, if the line with fsid=0 is not mountable to all nodes, also the
mounts below it will fail.
And if the line with fsid=0 is mountable to all nodes, all further lines
can provide no additional security!

Example; this is my current export:

/virtual_machines/kvm/export   
10.48.0.0/24(rw,no_root_squash,async,subtree_check,fsid=0)
/virtual_machines/kvm/export/hwnode1  
10.48.0.10(rw,no_root_squash,async,subtree_check)
/virtual_machines/kvm/export/hwnode2  
10.48.0.11(rw,no_root_squash,async,subtree_check)

I have two hardware nodes for virtual machines. Ideally each one of them
should be able to mount only its subdirectory, but the export shown
above is the only working one I could create.
However with the above export file the root user on hwnode1 can directly
mount /virtual_machines/kvm/export and see everything, even the files
that were for hwnode2 only.
OTOH if I set my fsid=0 line so that it's not mountable (e.g. changing
the IP or netmask), all lines below it stop working.

How should I do?

Thanks for your help


             reply	other threads:[~2011-02-10  1:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-10  1:47 Asdo [this message]
2011-02-10 21:41 ` How to separate mount rights in nfsv4 J. Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D534394.2050404@shiftmail.org \
    --to=asdo@shiftmail.org \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox