[GE users] affecting umask for qsub jobs

reuti reuti at staff.uni-marburg.de
Thu Nov 13 18:26:51 GMT 2008


Am 13.11.2008 um 17:22 schrieb David Pinsky 288-3739:

> I would like to have our SGE Grid cell use a different umask for  
> jobs that
> are submitted/run.  Anyone know how to effect this?
>
> Here is the (simplified) situation:
>
> Submit host:     H
> Execution host:  X
> sge_master host: M
>
> On H, I execute:
>   % umask
>   002
>   % rm /net/H/tmp/log
>   % qsub -o /net/H/tmp/log -e /net/H/tmp/log -j y -b yes umask
>   % ls -l /net/H/tmp/log
>   -rw-r--r--  1 dep fiddms 5 Nov 13 09:06 /net/H/tmp/log
>   % cat /net/H/tmp/log
>   022
>
> This shows that my umask is 002, but that the umask in effect when  
> my job
> runs is 022, and the umask used by SGE to create the log file is 022.
>
> What I would like is that the umask in effect at submission is used  
> by SGE
> both to create the log file, and as the umask of my remote job.
>
> I know I can set my umask in the task script that I submit.  And I  
> know
> I can chmod the $SGE_STDERR_PATH and $SGE_STDOUT_PATH in that job  
> script.
> But this requires adding these operations to every type of job  
> script that we
> have (many, many) and that we devise.  And it still does not cover  
> simple
> submisstions where there is no wrapper script.
>
> Is there a way I can set up the sge* daemons, or configure this grid
> installation, or setup a prolog/epilog script that will take care  
> of this.
> Again, what I'd like is for the invoking umask to be used, but I  
> would settle
> for the ability to have SGE use 002 rather than 022 umask.  Our  
> users must
> have the ability to share/interoperate on files created by each  
> other's jobs.

Hi,

you will have to change the source as it's hard coded:

http://gridengine.sunsource.net/ds/viewMessage.do? 
dsMessageId=35830&dsForumId=38

As an alternative you can define a starter_method for the queue:

#!/bin/sh
umask 002
exec "$@"

-- reuti

> Thanks for any help you can give,
>
> David
>
> David Pinsky                                     
> david.pinsky at avagotech.com
> Avago Technologies, APD                         970-288-3739
> 4380 Zeigler Road                               970-288-6580 (fax)
> Fort Collins, CO  80525-9790                    Mailstop 72
>
> ------------------------------------------------------
> http://gridengine.sunsource.net/ds/viewMessage.do? 
> dsForumId=38&dsMessageId=88689
>
> To unsubscribe from this discussion, e-mail: [users- 
> unsubscribe at gridengine.sunsource.net].

------------------------------------------------------
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=88691

To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].



More information about the gridengine-users mailing list