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

Lydia Heck lydia.heck at durham.ac.uk
Fri Sep 5 14:25:14 BST 2008


Hi Andy,

I have employed the USE_QSUB_GID variable and that does definitely do
the trick.

For it to work I change to newgrp reion.
Then I submit the job and all the files' group ownership is reion.

Thank you.

Lydia







On Fri, 5 Sep 2008, Andy Schwierskott wrote:

> Lydia,
>
> without changing the shepherd code you cannot achieve that the stdout/err
> files are created under specific group id's. Files created after the newgrp
> command in the job script should be owned by the new group. In your case
> possibly the user was no in group "reion". What does "id" (or "id -a") say?
> does it work outside an SGE job?
>
> If your users are cooperative, as admin you can enable the USE_QSUB_GID=true
> setting (an "execd_params") and then users can *submit* jobs with the target
> group id. Then even stdout/err files will the submit group id.
>
> >From sge-conf(5):
>       USE_QSUB_GID
>            If this parameter is set to true, the primary group  id
>            being  active  when  a job was submitted will be set to
>            become the primary group id for job execution.  If  the
>            parameter  is  not set, the primary group id as defined
>            for the job owner in the execution host passwd(5)  file
>            is used.
>            [...]
>
> If external rsh_daemon's/qlogin_daemon's are used (6.1 and earlier or
> explicitly configured in 6.2) it does not work for qrsh (no command) and
> qlogin.
>
> Andy
>
> On Fri, 5 Sep 2008, Lydia Heck wrote:
>
> >
> > 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
> > umask 002
> >
> > cd /data/dir/my-new-directory
> > cat /etc/hosts > my-test-file
> > +++++++++++++++++++++++++++++++++++++++++
> >
> >
> >
> >
> >
> >
> > 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
>

------------------------------------------
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




More information about the gridengine-users mailing list