Access with more than 16 Unix groups

This article tells you how to access the file-system when you have permission to access more than 16 Unix groups.

Unix groups

Unix groups are used to manage access to resources on the file-system. You can find out the group ownership of a file or directory using the "ls -l" command, for example:

$ ls -l test.txt
-rw-r--r-- 1 jbloggs open   3 Nov 22 11:59 test.txt
In this example, "jbloggs" is the owner and "open" is the group.
You can find out which groups your user belongs to by using the "groups" command, for example:
$ groups 
users gws_ukca esacat1 ecmwf ukmo open 

As you request access to more datasets, group workspaces and other resources on JASMIN the number of Unix groups associated with your user will increase. A user can be granted access to any number of Unix groups.

The 16-group session limit

However, on a standard Unix file-system (and on JASMIN) a user has a hard limit of 16 groups that are accessible within a given session. This means that sometimes you may be refused permission to read/write to a given directory even though your user does have the required permission.

Using "newgrp" to overcome the 16-group limit

A common situation is that you wish to run a process that needs to access resources belonging a group that is in the scope of the current session.
You can use the "newgrp" command to generate a new session in which you explicitly set the default group. For example:
$ newgrp ecmwf
The above command will make "ecmwf" the default group for the new session started.

Still need help? Contact Us Contact Us