Skip to contentSkip to conversation

NFS TUNING: #define NFS3_MAXGROUPS

DISCUSSION Christian Fischer 3 participants 6 messages Sep 26, 2004 – Sep 27, 2004

lore
Share & tools
lore
#0 lore raw

Hello.

Please can you tell me if NFS_MAXGROUPS is tunable for linux kernel? (and is it safe?) I need more than 16 groups per user. For BSD-kernel it is a tunable constant (i think so) and I'm not so familar with such things.

What else must i do if it is really tunable?

Thanks
Christian

#1 lore raw
Quoted 10 lines · Christian Fischer

Hello.

Please can you tell me if NFS_MAXGROUPS is tunable for linux kernel? (and is it safe?) I need more than 16 groups per user. For BSD-kernel it is a tunable constant (i think so) and I'm not so familar with such things.

What else must i do if it is really tunable?

Thanks
Christian

Sorry, broken english.

Please can you tell me whether NFS_MAXGROUPS is tunable for linux kernel?

Thanks again

#2 lore raw
Quoted 6 lines · Christian Fischer
Quoted 5 lines · Christian Fischer

Hello.

Please can you tell me if NFS_MAXGROUPS is tunable for linux kernel? (and is it safe?) I need more than 16 groups per user. For BSD-kernel it is a tunable constant (i think so) and I'm not so familar with such things.

That limit is hardcoded in the SUNRPC protocol (part of NFS) and _cannot_ be changed: it is a fundamental constant in NFS with AUTH_UNIX authentication. However, there is a trick to bypass this protocol limitation, see http://www.frankvm.com/nfs-ngroups for a 2.4.x patch.

The 2.6.x patch is under development.

Signature · 1 line
Frank
#3 lore raw
Quoted 6 lines · Frank van Maarseveen

That limit is hardcoded in the SUNRPC protocol (part of NFS) and _cannot_ be changed: it is a fundamental constant in NFS with AUTH_UNIX authentication. However, there is a trick to bypass this protocol limitation, see http://www.frankvm.com/nfs-ngroups for a 2.4.x patch.

The 2.6.x patch is under development.

Thanks for this link. It isn't no more necessary to patch anything since i've reduced the number of groups per uid to the limit. Well, i'd been reading the sunRPC rfc before, bringing a lot of trouble to me.

The main problem was that users in the seventeenth (or higher) group (they should not have any permissions for this group because of NFS_MAXGROUPS) were able to change without permissions into those directories. I think a user or group should have permission or NOT, and not a "bit of permissions".

Christian

root@terminalserver # ls -al /home/henry/shared/
[...]
drwxrws--- not_henry 17th_grp work
[...]

henry@terminalserver # cd /home/henry/shared/work/ henry@terminalserver work # ls
ls: reading directory .: Permission denied

# groups henry
[...]   17th_grp   18th_grp   [...]
#4 lore raw
In reply to Christian Fischer

På su , 26/09/2004 klokka 10:38, skreiv Christian Fischer:

Quoted 7 lines

Hello.

Please can you tell me if NFS_MAXGROUPS is tunable for linux kernel? (and is it safe?) I need more than 16 groups per user. For BSD-kernel it is a tunable constant (i think so) and I'm not so familar with such things.

What else must i do if it is really tunable?

No, it is NOT tunable. The SunRPC protocol (rfc1831) states clearly that the AUTH_SYS (a.k.a. AUTH_UNIX) structure is defined as

      struct authsys_parms {
         unsigned int stamp;
         string machinename<255>;
         unsigned int uid;
         unsigned int gid;
         unsigned int gids<16>;
      };

If the BSDs are playing around with that, then they are not adhering to the protocol, and will be incompatible with all other SunRPC implementations.

Cheers,
Trond

#5 lore raw
Quoted 11 lines · Trond Myklebust

No, it is NOT tunable. The SunRPC protocol (rfc1831) states clearly that the AUTH_SYS (a.k.a. AUTH_UNIX) structure is defined as

      struct authsys_parms {
         unsigned int stamp;
         string machinename<255>;
         unsigned int uid;
         unsigned int gid;
         unsigned int gids<16>;
      };
Quoted 3 lines

If the BSDs are playing around with that, then they are not adhering to the protocol, and will be incompatible with all other SunRPC implementations.

That's a pity.
Christian