All of lore.kernel.org
 help / color / mirror / Atom feed
* NFSv4 / POSIX ACL mapping bug?
@ 2011-07-26 14:43 Robert Marcano
  2011-07-26 18:33 ` Andy Adamson
  2011-07-27 15:47 ` NFSv4 / POSIX ACL mapping bug? J. Bruce Fields
  0 siblings, 2 replies; 11+ messages in thread
From: Robert Marcano @ 2011-07-26 14:43 UTC (permalink / raw)
  To: linux-nfs

Hi, This question is probably too simple for this nfs developer list, 
but I am intrigued to know if this is a bug or not, I do not find any 
other reference to anyone with this problem

Ineed some help clarifying this issue in order to know if this is a bug 
or limits of the NFSv4 / POSIX ACL mapping before reporting it

Creating a directory on the server with the following POSIX ACLs, rwx 
for the group "sharedgroup" and same defaults:

############################################################
# file: directory
# owner: root
# group: root
user::rwx
group::r-x
group:sharedgroup:rwx
mask::rwx
other::---
default:user::rwx
default:group::r-x
default:group:sharedgroup:rwx
default:mask::rwx
default:other::---
############################################################

Creating files with the same user with umask 022 on the server an on the 
NFS client, the files do not get the same POSIX ACL mask:

############################################################
# file: client
# owner: test
# group: testgroup
user::rw-
group::r-x                   #effective:r--
group:sharedgroup:rwx        #effective:r--
mask::r--
other::r--

# file: server
# owner: test
# group: testgroup
user::rw-
group::r-x                   #effective:r--
group:sharedgroup:rwx        #effective:rw-
mask::rw-
other::r--
############################################################

Is this normal or a bug?, My interpretation is that even that the 
mapping of the ACLs is not 100% perfect this simple example should not 
be a problem. Is it impossible using NFS to create a shared directory 
for a group of users?

Thanks in advance

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: NFSv4 / POSIX ACL mapping bug?
  2011-07-26 14:43 NFSv4 / POSIX ACL mapping bug? Robert Marcano
@ 2011-07-26 18:33 ` Andy Adamson
  2011-07-26 19:29   ` Robert Marcano
  2011-07-27 15:18   ` NFSv4 / POSIX ACL mapping bug? (more tests) Robert Marcano
  2011-07-27 15:47 ` NFSv4 / POSIX ACL mapping bug? J. Bruce Fields
  1 sibling, 2 replies; 11+ messages in thread
From: Andy Adamson @ 2011-07-26 18:33 UTC (permalink / raw)
  To: Robert Marcano; +Cc: linux-nfs

Hi

Which client, which server (distro and uname -a output) did you use? Also, what commands (setfacl,getfacl? nfs4_setfacl, nfs4_getfacl ? plus version) and parameters did you use?

-->Andy
On Jul 26, 2011, at 10:43 AM, Robert Marcano wrote:

> Hi, This question is probably too simple for this nfs developer list, but I am intrigued to know if this is a bug or not, I do not find any other reference to anyone with this problem
> 
> Ineed some help clarifying this issue in order to know if this is a bug or limits of the NFSv4 / POSIX ACL mapping before reporting it
> 
> Creating a directory on the server with the following POSIX ACLs, rwx for the group "sharedgroup" and same defaults:
> 
> ############################################################
> # file: directory
> # owner: root
> # group: root
> user::rwx
> group::r-x
> group:sharedgroup:rwx
> mask::rwx
> other::---
> default:user::rwx
> default:group::r-x
> default:group:sharedgroup:rwx
> default:mask::rwx
> default:other::---
> ############################################################
> 
> Creating files with the same user with umask 022 on the server an on the NFS client, the files do not get the same POSIX ACL mask:
> 
> ############################################################
> # file: client
> # owner: test
> # group: testgroup
> user::rw-
> group::r-x                   #effective:r--
> group:sharedgroup:rwx        #effective:r--
> mask::r--
> other::r--
> 
> # file: server
> # owner: test
> # group: testgroup
> user::rw-
> group::r-x                   #effective:r--
> group:sharedgroup:rwx        #effective:rw-
> mask::rw-
> other::r--
> ############################################################
> 
> Is this normal or a bug?, My interpretation is that even that the mapping of the ACLs is not 100% perfect this simple example should not be a problem. Is it impossible using NFS to create a shared directory for a group of users?
> 
> Thanks in advance
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: NFSv4 / POSIX ACL mapping bug?
  2011-07-26 18:33 ` Andy Adamson
@ 2011-07-26 19:29   ` Robert Marcano
  2011-07-26 19:33     ` Robert Marcano
  2011-07-27 15:18   ` NFSv4 / POSIX ACL mapping bug? (more tests) Robert Marcano
  1 sibling, 1 reply; 11+ messages in thread
From: Robert Marcano @ 2011-07-26 19:29 UTC (permalink / raw)
  To: linux-nfs

On 07/26/2011 02:03 PM, Andy Adamson wrote:
> Hi
>
> Which client, which server (distro and uname -a output) did you use? Also, what commands (setfacl,getfacl? nfs4_setfacl, nfs4_getfacl ? plus version) and parameters did you use?

Thanks, here is the missing data

NFS Server:
   CentOS release 5.6
   Linux *** 2.6.18-238.9.1.el5 #1 SMP Tue Apr 12 18:10:13 EDT 2011 
x86_64 x86_64 x86_64 GNU/Linux

Client:
   Fedora 15
   Linux *** 2.6.38.7-30.fc15.i686.PAE #1 SMP Fri May 27 05:44:56 UTC 
2011 i686 i686 i386 GNU/Linux

The acls are POSIX ACLs assigned server side

=================================================
Commands on the CentOS NFS server:
not on the NFS mounted directory but on the source filesystem that is 
exported, using root
=================================================
# umask 022
# mkdir directory
# setfacl -m d:g:sharedgroup:rwx directory
# setfacl -m g:sharedgroup:rwx directory
# touch directory/server
# getfacl directory/server

# file: directory/server
# owner: root
# group: root
user::rw-
group::r-x			#effective:r--
group:sharedgroup:rwx		#effective:rw-
mask::rw-
other::r--


=================================================
Commands on the Fedora NFS client:
using a non root user (a Kerberos authenticated user in our setup named 
test)
=================================================
$ umask 022
$ touch directory/client

=================================================
Commands on the CentOS NFS server:
=================================================
# getfacl directory/client

# file: directory/client
# owner: test
# group: ipausers
user::rw-
group::r-x			#effective:r--
group:sharedgroup:rwx		#effective:r--
mask::r--
other::r--

When the file is created locally it gets the default ACL from 
"directory" with mask "mask::rw-"

Thanks in advance


>
> -->Andy
> On Jul 26, 2011, at 10:43 AM, Robert Marcano wrote:
>
>> Hi, This question is probably too simple for this nfs developer list, but I am intrigued to know if this is a bug or not, I do not find any other reference to anyone with this problem
>>
>> Ineed some help clarifying this issue in order to know if this is a bug or limits of the NFSv4 / POSIX ACL mapping before reporting it
>>
>> Creating a directory on the server with the following POSIX ACLs, rwx for the group "sharedgroup" and same defaults:
>>
>> ############################################################
>> # file: directory
>> # owner: root
>> # group: root
>> user::rwx
>> group::r-x
>> group:sharedgroup:rwx
>> mask::rwx
>> other::---
>> default:user::rwx
>> default:group::r-x
>> default:group:sharedgroup:rwx
>> default:mask::rwx
>> default:other::---
>> ############################################################
>>
>> Creating files with the same user with umask 022 on the server an on the NFS client, the files do not get the same POSIX ACL mask:
>>
>> ############################################################
>> # file: client
>> # owner: test
>> # group: testgroup
>> user::rw-
>> group::r-x                   #effective:r--
>> group:sharedgroup:rwx        #effective:r--
>> mask::r--
>> other::r--
>>
>> # file: server
>> # owner: test
>> # group: testgroup
>> user::rw-
>> group::r-x                   #effective:r--
>> group:sharedgroup:rwx        #effective:rw-
>> mask::rw-
>> other::r--
>> ############################################################
>>
>> Is this normal or a bug?, My interpretation is that even that the mapping of the ACLs is not 100% perfect this simple example should not be a problem. Is it impossible using NFS to create a shared directory for a group of users?
>>
>> Thanks in advance
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: NFSv4 / POSIX ACL mapping bug?
  2011-07-26 19:29   ` Robert Marcano
@ 2011-07-26 19:33     ` Robert Marcano
  0 siblings, 0 replies; 11+ messages in thread
From: Robert Marcano @ 2011-07-26 19:33 UTC (permalink / raw)
  To: linux-nfs

On 07/26/2011 02:59 PM, Robert Marcano wrote:
> On 07/26/2011 02:03 PM, Andy Adamson wrote:
>> Hi
>>
>> Which client, which server (distro and uname -a output) did you use?
>> Also, what commands (setfacl,getfacl? nfs4_setfacl, nfs4_getfacl ?
>> plus version) and parameters did you use?

Adding missing versions on the CentOS NFS Server

setfacl 2.2.39
getfacl 2.2.39


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: NFSv4 / POSIX ACL mapping bug? (more tests)
  2011-07-26 18:33 ` Andy Adamson
  2011-07-26 19:29   ` Robert Marcano
@ 2011-07-27 15:18   ` Robert Marcano
  1 sibling, 0 replies; 11+ messages in thread
From: Robert Marcano @ 2011-07-27 15:18 UTC (permalink / raw)
  To: linux-nfs

On 07/26/2011 02:03 PM, Andy Adamson wrote:
> Hi
>
> Which client, which server (distro and uname -a output) did you use? Also, what commands (setfacl,getfacl? nfs4_setfacl, nfs4_getfacl ? plus version) and parameters did you use?
>

Now using nfs4 acl tools

nfs4_getfacl 0.3.3
nfs4_setfacl 0.3.3

======================================
NFS client (Fedora 15)
======================================

$ nfs4_getfacl directory/
A::OWNER@:rwaDxtTcCy
A::GROUP@:rxtcy
A::EVERYONE@:rxtcy

$ nfs4_setfacl -a A:gdf:sharedgroup@localdomain:rwaDxtcy directory/

$ nfs4_getfacl directory/
A::OWNER@:rwaDxtTcCy
A::GROUP@:rxtcy
A:g:sharedgroup@localdomain:rwaDxtcy
A::EVERYONE@:rxtcy
D:fdi:OWNER@:rwaDx
A:fdi:OWNER@:tTcCy
A:fdi:GROUP@:tcy
A:fdig:sharedgroup@localdomain:rwaDxtcy
A:fdi:EVERYONE@:tcy

$ touch directory/client

$ nfs4_getfacl directory/client
D::OWNER@:r
A::OWNER@:tTcCy
A::GROUP@:tcy
A:g:sharedgroup@localdomain:rtcy
A::EVERYONE@:tcy

Inheritance was added for the group sharedgroup to the directory, but 
the file does not gets w permission when the file is created, the NFS 
ACL <--> POSIX ACL Mapping on the file "client" on the server are

# getfacl directory
user::rwx
group::r-x
group:admision:rwx
mask::rwx
other::r-x
default:user::---
default:group::---
default:group:admision:rwx
default:mask::rwx
default:other::---

# getfacl directory/client
user::---
group::---
group:sharedgroup:rwx		#effective:r--
mask::r--
other::---

Why the client user umask (022) is being used for the inherited 
permissions for the group "sharedgroup"? is this by design or a bug?

Thanks in advance

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: NFSv4 / POSIX ACL mapping bug?
  2011-07-26 14:43 NFSv4 / POSIX ACL mapping bug? Robert Marcano
  2011-07-26 18:33 ` Andy Adamson
@ 2011-07-27 15:47 ` J. Bruce Fields
  2011-07-27 16:17   ` Robert Marcano
  1 sibling, 1 reply; 11+ messages in thread
From: J. Bruce Fields @ 2011-07-27 15:47 UTC (permalink / raw)
  To: Robert Marcano; +Cc: linux-nfs

On Tue, Jul 26, 2011 at 10:13:44AM -0430, Robert Marcano wrote:
> Hi, This question is probably too simple for this nfs developer
> list, but I am intrigued to know if this is a bug or not, I do not
> find any other reference to anyone with this problem
> 
> Ineed some help clarifying this issue in order to know if this is a
> bug or limits of the NFSv4 / POSIX ACL mapping before reporting it
> 
> Creating a directory on the server with the following POSIX ACLs,
> rwx for the group "sharedgroup" and same defaults:
> 
> ############################################################
> # file: directory
> # owner: root
> # group: root
> user::rwx
> group::r-x
> group:sharedgroup:rwx
> mask::rwx
> other::---
> default:user::rwx
> default:group::r-x
> default:group:sharedgroup:rwx
> default:mask::rwx
> default:other::---
> ############################################################
> 
> Creating files with the same user with umask 022 on the server an on
> the NFS client, the files do not get the same POSIX ACL mask:
> 
> ############################################################
> # file: client
> # owner: test
> # group: testgroup
> user::rw-
> group::r-x                   #effective:r--
> group:sharedgroup:rwx        #effective:r--
> mask::r--
> other::r--
> 
> # file: server
> # owner: test
> # group: testgroup
> user::rw-
> group::r-x                   #effective:r--
> group:sharedgroup:rwx        #effective:rw-
> mask::rw-
> other::r--
> ############################################################
> 
> Is this normal or a bug?, My interpretation is that even that the
> mapping of the ACLs is not 100% perfect this simple example should
> not be a problem. Is it impossible using NFS to create a shared
> directory for a group of users?

Without looking at your example carefully, it sounds like the same
problem as discussed here:

	http://marc.info/?t=123739823200003&r=1&w=2

--b.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: NFSv4 / POSIX ACL mapping bug?
  2011-07-27 15:47 ` NFSv4 / POSIX ACL mapping bug? J. Bruce Fields
@ 2011-07-27 16:17   ` Robert Marcano
  2011-07-28  4:13     ` Vladimir Elisseev
  2011-08-02  1:09     ` J. Bruce Fields
  0 siblings, 2 replies; 11+ messages in thread
From: Robert Marcano @ 2011-07-27 16:17 UTC (permalink / raw)
  To: linux-nfs

On 07/27/2011 11:17 AM, J. Bruce Fields wrote:
> On Tue, Jul 26, 2011 at 10:13:44AM -0430, Robert Marcano wrote:
...
>> Is this normal or a bug?, My interpretation is that even that the
>> mapping of the ACLs is not 100% perfect this simple example should
>> not be a problem. Is it impossible using NFS to create a shared
>> directory for a group of users?
>
> Without looking at your example carefully, it sounds like the same
> problem as discussed here:
>
> 	http://marc.info/?t=123739823200003&r=1&w=2

Thanks, exactly the same problem, current user umask getting in the way 
of ACL inheritance, looks like the answers is that this is currently not 
possible because the umask is applied client side and the NFSv4 protocol 
does not help to send that info to the server. No workaround available 
(mount option or something like that)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: NFSv4 / POSIX ACL mapping bug?
  2011-07-27 16:17   ` Robert Marcano
@ 2011-07-28  4:13     ` Vladimir Elisseev
  2011-08-02  1:09     ` J. Bruce Fields
  1 sibling, 0 replies; 11+ messages in thread
From: Vladimir Elisseev @ 2011-07-28  4:13 UTC (permalink / raw)
  To: Robert Marcano; +Cc: linux-nfs

Just because of this problem we're (still) using NFS3 with kerberos...

On Wed, 2011-07-27 at 11:47 -0430, Robert Marcano wrote:
> On 07/27/2011 11:17 AM, J. Bruce Fields wrote:
> > On Tue, Jul 26, 2011 at 10:13:44AM -0430, Robert Marcano wrote:
> ...
> >> Is this normal or a bug?, My interpretation is that even that the
> >> mapping of the ACLs is not 100% perfect this simple example should
> >> not be a problem. Is it impossible using NFS to create a shared
> >> directory for a group of users?
> >
> > Without looking at your example carefully, it sounds like the same
> > problem as discussed here:
> >
> > 	http://marc.info/?t=123739823200003&r=1&w=2
> 
> Thanks, exactly the same problem, current user umask getting in the way 
> of ACL inheritance, looks like the answers is that this is currently not 
> possible because the umask is applied client side and the NFSv4 protocol 
> does not help to send that info to the server. No workaround available 
> (mount option or something like that)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: NFSv4 / POSIX ACL mapping bug?
  2011-07-27 16:17   ` Robert Marcano
  2011-07-28  4:13     ` Vladimir Elisseev
@ 2011-08-02  1:09     ` J. Bruce Fields
  1 sibling, 0 replies; 11+ messages in thread
From: J. Bruce Fields @ 2011-08-02  1:09 UTC (permalink / raw)
  To: Robert Marcano; +Cc: linux-nfs

On Wed, Jul 27, 2011 at 11:47:13AM -0430, Robert Marcano wrote:
> On 07/27/2011 11:17 AM, J. Bruce Fields wrote:
> >On Tue, Jul 26, 2011 at 10:13:44AM -0430, Robert Marcano wrote:
> ...
> >>Is this normal or a bug?, My interpretation is that even that the
> >>mapping of the ACLs is not 100% perfect this simple example should
> >>not be a problem. Is it impossible using NFS to create a shared
> >>directory for a group of users?
> >
> >Without looking at your example carefully, it sounds like the same
> >problem as discussed here:
> >
> >	http://marc.info/?t=123739823200003&r=1&w=2
> 
> Thanks, exactly the same problem, current user umask getting in the
> way of ACL inheritance, looks like the answers is that this is
> currently not possible because the umask is applied client side and
> the NFSv4 protocol does not help to send that info to the server. No
> workaround available (mount option or something like that)

I seem to recall there was a solution proposed in the above thread that
Trond was OK with; if someone wants to read through it and implement
that, I'm sure patches would be welcome....

--b.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: NFSv4 / POSIX ACL mapping bug?
       [not found] ` <4E2EECE9.3080500-3g6LKK052cRzu6KWmfFNGwC/G2K4zDHf@public.gmane.org>
@ 2011-07-26 18:09   ` Robert Marcano
  0 siblings, 0 replies; 11+ messages in thread
From: Robert Marcano @ 2011-07-26 18:09 UTC (permalink / raw)
  To: linux-nfs

oops sorry for the double post, mailing list archives web page has a 
long cache and I never saw the email there

^ permalink raw reply	[flat|nested] 11+ messages in thread

* NFSv4 / POSIX ACL mapping bug?
@ 2011-07-26 16:35 Robert Marcano
       [not found] ` <4E2EECE9.3080500-3g6LKK052cRzu6KWmfFNGwC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Robert Marcano @ 2011-07-26 16:35 UTC (permalink / raw)
  To: linux-nfs

Hi, This question is probably too simple for this nfs developer list, 
but I am intrigued to know if this is a bug or not, I do not find any 
other reference to anyone with this problem

Ineed some help clarifying this issue in order to know if this is a bug 
or limits of the NFSv4 / POSIX ACL mapping before reporting it

Creating a directory on the server with the following POSIX ACLs, rwx 
for the group "sharedgroup" and same defaults:

############################################################
# file: directory
# owner: root
# group: root
user::rwx
group::r-x
group:sharedgroup:rwx
mask::rwx
other::---
default:user::rwx
default:group::r-x
default:group:sharedgroup:rwx
default:mask::rwx
default:other::---
############################################################

Creating files with the same user with umask 022 on the server an on the 
NFS client, the files do not get the same POSIX ACL mask:

############################################################
# file: client
# owner: test
# group: testgroup
user::rw-
group::r-x                   #effective:r--
group:sharedgroup:rwx        #effective:r--
mask::r--
other::r--

# file: server
# owner: test
# group: testgroup
user::rw-
group::r-x                   #effective:r--
group:sharedgroup:rwx        #effective:rw-
mask::rw-
other::r--
############################################################

Is this normal or a bug?, My interpretation is that even that the 
mapping of the ACLs is not 100% perfect this simple example should not 
be a problem. Is it impossible using NFS to create a shared directory 
for a group of users?

Thanks in advance

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-08-02  1:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-26 14:43 NFSv4 / POSIX ACL mapping bug? Robert Marcano
2011-07-26 18:33 ` Andy Adamson
2011-07-26 19:29   ` Robert Marcano
2011-07-26 19:33     ` Robert Marcano
2011-07-27 15:18   ` NFSv4 / POSIX ACL mapping bug? (more tests) Robert Marcano
2011-07-27 15:47 ` NFSv4 / POSIX ACL mapping bug? J. Bruce Fields
2011-07-27 16:17   ` Robert Marcano
2011-07-28  4:13     ` Vladimir Elisseev
2011-08-02  1:09     ` J. Bruce Fields
2011-07-26 16:35 Robert Marcano
     [not found] ` <4E2EECE9.3080500-3g6LKK052cRzu6KWmfFNGwC/G2K4zDHf@public.gmane.org>
2011-07-26 18:09   ` Robert Marcano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.