Looks like the groups & id command actually mix reporting of the current 
process and what's in /etc/group, so don't work to debug this issue. I can 
confirm that the permissions act as shown in /proc/pid/status. Note the 
"permission denied" below. Submitting the same job with primary gid=1000 works 
(out file contains "success!").

[prout@login-0 ~]$ id
uid=1000(prout) gid=19(floppy) 
groups=1000(prout),10(wheel),11(cdrom),19(floppy),20(games)

[prout@login-0 ~]$ ls -lah testfile
-rw-r----- 1 root prout 9 Dec 11 09:47 testfile

[prout@login-0 ~]$ cat testfile
success!

[prout@login-0 ~]$ sbatch --wrap="cat testfile"
Submitted batch job 1418

[prout@login-0 ~]$ cat slurm-1418.out
cat: testfile: Permission denied

[prout@login-0 ~]$ sbatch --wrap="id"
Submitted batch job 1419

[prout@login-0 ~]$ cat slurm-1419.out
uid=1000(prout) gid=19(floppy) 
groups=1000(prout),10(wheel),11(cdrom),19(floppy),20(games)

________________________________________
From: Chris Samuel [[email protected]]
Sent: Thursday, December 11, 2014 2:14 AM
To: slurm-dev
Subject: [slurm-dev] Re: User's primary group lost when submitting with 
different GID

On Wed, 10 Dec 2014 09:20:27 AM Andrew J. Prout wrote:

> Below are some examples of what I'm seeing with SLURM 14.11.0. Notice that
> group 1000 disappears in the sleep process.

I can't replicate this on Slurm 14.03.10, FWIW, it seems to do the right
thing.

Also remember that you can grab your groups easily with:

sbatch --wrap groups

or alternatively using your method of:

sbatch --wrap 'grep Groups: /proc/self/status'


Hope this helps!
Chris
--
 Christopher Samuel        Senior Systems Administrator
 VLSCI - Victorian Life Sciences Computation Initiative
 Email: [email protected] Phone: +61 (0)3 903 55545
 http://www.vlsci.org.au/      http://twitter.com/vlsci

Reply via email to