Skip to contentSkip to conversation

Group limit for NFS exported file systems

DISCUSSION Robert Szentmihalyi 6 participants 12 messages Aug 23, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

is there a group limit for NFS exported file systems in recent kernels?
One if my users cannot access directories that belong to a group he actually _is_ a member of. That, however, is true only when accessing them over NFS. On the local file system, everything is fine. UIDs and GIDs are the same on client and server, so that cannot be the problem. Client and server run Gentoo Linux with kernel 2.6.16 on the server and 2.6.17 on the client. Any ideas?

TIA,
Robert

#1 lore raw
Quoted 5 lines

Hi,

is there a group limit for NFS exported file systems in recent kernels?
One if my users cannot access directories that belong to a group he actually _is_ a member of. That, however, is true only when accessing them over NFS. On the local file system, everything is fine. UIDs and GIDs are the same on client and server, so that cannot be the problem. Client and server run Gentoo Linux with kernel 2.6.16 on the server and 2.6.17 on the client. Any ideas?

Is his fsuid/fsgid suddenly different?

Jan Engelhardt

#2 lore raw
Quoted 5 lines
Quoted 5 lines

Hi,

is there a group limit for NFS exported file systems in recent kernels? One if my users cannot access directories that belong to a group he

Quoted 8 lines

actually _is_ a member of. That, however, is true only when accessing them over NFS. On the local file system, everything is fine. UIDs and GIDs are the same on client and server, so that cannot be the problem. Client and server run Gentoo Linux with kernel 2.6.16 on the server and 2.6.17 on the client.

Quoted 1 line

Any ideas?

Is his fsuid/fsgid suddenly different?

No. He just gets "access denied" for no obvious reason.

Quoted 3 lines

Jan Engelhardt

Robert

#3 lore raw
In reply to Robert Szentmihalyi
Quoted 6 lines · Robert Szentmihalyi

is there a group limit for NFS exported file systems in recent kernels? One if my users cannot access directories that belong to a group he actually _is_ a member of. That, however, is true only when accessing them over NFS. On the local file system, everything is fine. UIDs and GIDs are the same on client and server, so that cannot be the problem. Client and server run Gentoo Linux with kernel 2.6.16 on the server and 2.6.17 on the client.

Is he a member of more than 16 groups?

#4 lore raw
Quoted 6 lines · Robert Szentmihalyi
Quoted 2 lines

is there a group limit for NFS exported file systems in recent kernels? One if my users cannot access directories that belong to a group he

actually _is_ a

Quoted 1 line

member of. That, however, is true only when accessing them over NFS. On

Quoted 8 lines

the local file

Quoted 1 line

system, everything is fine. UIDs and GIDs are the same on client and

server, so that

Quoted 1 line

cannot be the problem. Client and server run Gentoo Linux with kernel

2.6.16 on the

Quoted 1 line

server and 2.6.17 on the client.

Is he a member of more than 16 groups?

Yes. He is actually a member of 27 groups.
Is the limit of 16 groups still current? I was under the impression that it is a limitation of 2.4 kernels.... Is there any proper work-around for this?

Thanks,
Robert

#5 lore raw
Quoted 4 lines · Robert Szentmihalyi
Quoted 1 line

Is he a member of more than 16 groups?

Yes. He is actually a member of 27 groups.
Is the limit of 16 groups still current? I was under the impression that it is a limitation of 2.4 kernels....

Under 2.6 local group membership was expanded to 65536. NFS, however, is a standard separate from Linux, and it imposes a limit of 16 groups on the wire for the AUTH_UNIX credentials.

If all your client systems are Linux, you can use the patch at:
http://www.frankvm.com/nfs-ngroups/
as a work around. (Only the client systems need the patch.)

I haven't used it myself, so best of luck.

Ray

#6 lore raw
Quoted 8 lines

Under 2.6 local group membership was expanded to 65536. NFS, however, is a standard separate from Linux, and it imposes a limit of 16 groups on the wire for the AUTH_UNIX credentials.

If all your client systems are Linux, you can use the patch at:
http://www.frankvm.com/nfs-ngroups/
as a work around. (Only the client systems need the patch.)

If only the client needs to be patched, non-patched and/or non-Linux clients and the server (linux or not) should have a problem, should they?

Jan Engelhardt

#7 lore raw
Quoted 2 lines · Jan Engelhardt

If only the client needs to be patched, non-patched and/or non-Linux clients and the server (linux or not) should have a problem, should they?

As I understand it, that's correct. Robert could legitimately patch only the system(s) in use by the user with 27 groups.

Again, though, I haven't used it, so take that with a grain of salt.

~r.

#8 lore raw
In reply to Robert Szentmihalyi
Quoted 19 lines · Robert Szentmihalyi
Quoted 19 lines · Robert Szentmihalyi
Quoted 4 lines

is there a group limit for NFS exported file systems in recent kernels? One if my users cannot access directories that belong to a group he

actually _is_ a

Quoted 2 lines

member of. That, however, is true only when accessing them over NFS. On

the local file

Quoted 2 lines

system, everything is fine. UIDs and GIDs are the same on client and

server, so that

Quoted 2 lines

cannot be the problem. Client and server run Gentoo Linux with kernel

2.6.16 on the

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

server and 2.6.17 on the client.

Is he a member of more than 16 groups?

Yes. He is actually a member of 27 groups.
Is the limit of 16 groups still current? I was under the impression that it is a limitation of 2.4 kernels.... Is there any proper work-around for this?

The 16 group limit is defined by the specification for AUTH_SYS for the RPC. It can not be easily changed without affecting interoperability.

The use of RPCSEC_GSS and Kerberos can remove this limit.

Thanx...

ps

#9 lore raw
In reply to Robert Szentmihalyi
Quoted 2 lines · Robert Szentmihalyi

is there a group limit for NFS exported file systems in recent kernels?
One if my users cannot access directories that belong to a group he actually _is_ a member of. That, however, is true only when accessing them over NFS. On the local file system, everything is fine. UIDs and GIDs are the same on client and server, so that cannot be the problem. Client and server run Gentoo Linux with kernel 2.6.16 on the server and 2.6.17 on the client.

NFSv2 has a 8 groups limit in the protocol iirc.

-Andi

#10 lore raw
Quoted 6 lines · Andi Kleen
Quoted 2 lines · Robert Szentmihalyi

is there a group limit for NFS exported file systems in recent kernels?
One if my users cannot access directories that belong to a group he actually _is_ a member of. That, however, is true only when accessing them over NFS. On the local file system, everything is fine. UIDs and GIDs are the same on client and server, so that cannot be the problem. Client and server run Gentoo Linux with kernel 2.6.16 on the server and 2.6.17 on the client.

NFSv2 has a 8 groups limit in the protocol iirc.

16, and it is a limitation of the RPC protocol's AUTH_UNIX/AUTH_SYS authentication scheme, rather than being specific to NFS.

Note that if you use KerberosV based authentication at your workplace, then you can migrate your NFS setup to the stronger RPCSEC_GSS/krb5 authentication. That also happens to fix the 16 groups limit problem.

Cheers,
Trond

#11 lore raw
In reply to Andi Kleen
Quoted 8 lines · Andi Kleen
Quoted 3 lines · Robert Szentmihalyi

is there a group limit for NFS exported file systems in recent kernels?
One if my users cannot access directories that belong to a group he actually _is_ a member of. That, however, is true only when accessing them over NFS. On the local file system, everything is fine. UIDs and GIDs are the same on client and server, so that cannot be the problem. Client and server run Gentoo Linux with kernel 2.6.16 on the server and 2.6.17 on the client.

NFSv2 has a 8 groups limit in the protocol iirc.

Ahh, no. None of the NFS protocols define anything about the authentication protocols. This is defined by the RPC protocol and it defines a limit of 16 for AUTH_SYS, otherwise known as AUTH_UNIX.

Interestingly, the original NFSv2 implementations had a limit of 8, then 10, and then finally 16.

Thanx...

ps