linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Lukas Hejtmanek <xhejtman@ics.muni.cz>
Cc: linux-nfs@vger.kernel.org
Subject: Re: ACLs
Date: Thu, 5 Aug 2010 14:52:12 -0400	[thread overview]
Message-ID: <20100805185211.GA11646@fieldses.org> (raw)
In-Reply-To: <20100805124729.GD31049@ics.muni.cz>

On Thu, Aug 05, 2010 at 02:47:29PM +0200, Lukas Hejtmanek wrote:
> Hello,
> 
> I use nfs4-acl-tools-0.3.3 and I get some oddities when setting the ACL:
> 
> $ nfs4_getfacl test
> A::OWNER@:rwatTcCy
> A::xhejtman@META:rtcy
> A::GROUP@:tcy
> A::EVERYONE@:tcy
> $ nfs4_setfacl -s "A::ludek@META:R" test
> $ nfs4_getfacl test
> D::OWNER@:r
> A::OWNER@:tTcCy
> A::ludek@META:rtcy
> A::GROUP@:tcy
> A::EVERYONE@:tcy
> 
> is this something expected or buggy acl-tools?

NFSv4 ACLs deny by default.  Thus the ACL "A::ludek@META:R" denies
permission to everyone else--including the owner of the file, if the
owner is not ludek.

The linux server has no way to store in its filesystem an acl that says
that; it *always* checks permissions for the owner before checking any
user permissions.

So the server decides it's safer to be pessimistic and adds that first
DENY....

Arguably the server could be less paranoid here.  But we'll always have
oddities like this as long as it doesn't have NFSv4 ACLs to work with on
the exported filesystem.  (Somebody's working on that.)

Workaround for now is probably just to always set the OWNER permissions
to be at least as permisive as anyone else's.  Or just add the
"A::ludek@META:R" ace instead of replacing the ACL wholesale (which is
what "-s" does).

(And then you'll still get ONWER, GROUP, and EVERYONE ACEs added on, but
they won't be as silly.)

--b.

      reply	other threads:[~2010-08-05 18:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-05 12:47 ACLs Lukas Hejtmanek
2010-08-05 18:52 ` J. Bruce Fields [this message]

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=20100805185211.GA11646@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=xhejtman@ics.muni.cz \
    /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;
as well as URLs for NNTP newsgroup(s).