[GE users] how to enforce newgrp in batch job ...

Reuti reuti at staff.uni-marburg.de
Fri Sep 5 13:14:18 BST 2008


Hi,

Am 05.09.2008 um 13:04 schrieb Lydia Heck:

>
> In our setup there are different projects and in order for people
> to share space I intend to use GIDs.  However I found that the
> group is not propagated by the batch system:
>
> The batch script is
> ++++++++++++++++++++++++++++++++++++++
> #!/bin/tcsh
> #$ -S /bin/tcsh
> #$ -cwd
>
> newgrp reion

newgrp will not set the group for this process, but creates a  
subshell for interactive shells; it should simply be ignored in a non- 
intercative environment.

> umask 002
>
> cd /data/dir/my-new-directory
> cat /etc/hosts > my-test-file

You can try:

sg reion -c "cat /etc/hosts > my-test-file"

HTH -- Reuti


> +++++++++++++++++++++++++++++++++++++++++
>
>
>
>
>
>
> The owner ship on my-test-file reflects the umask and is
>
> -rw-r--r--   1 dph0elh  dphlss         0 Sep  5 12:02 batch.e118466
> drwxrwxr-t   2 reion    reion          5 Sep  5 12:02 ./
> -rw-rw-r--   1 dph0elh  dphlss      4816 Sep  5 12:02 reion-test-hosts
> -rw-r--r--   1 dph0elh  dphlss       147 Sep  5 12:02 batch.o118466
>
>
> But the group ownership has not been honoured. Any idea how I could  
> enforce
> the change of group?
>
>
> ------------------------------------------
> Dr E L  Heck
>
> University of Durham
> Institute for Computational Cosmology
> Ogden Centre
> Department of Physics
> South Road
>
> DURHAM, DH1 3LE
> United Kingdom
>
> e-mail: lydia.heck at durham.ac.uk
>
> Tel.: + 44 191 - 334 3628
> Fax.: + 44 191 - 334 3645
> ___________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
> For additional commands, e-mail: users-help at gridengine.sunsource.net


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net




More information about the gridengine-users mailing list