Opened 11 years ago

Last modified 8 years ago

#572 new defect

IZ2721: pid file should not have execute rights

Reported by: crei Owned by:
Priority: low Milestone:
Component: sge Version: 6.1u5
Severity: Keywords: execution
Cc:

Description

[Imported from gridengine issuezilla http://gridengine.sunsource.net/issues/show_bug.cgi?id=2721]

        Issue #:      2721             Platform:     All      Reporter: crei (crei)
       Component:     gridengine          OS:        All
     Subcomponent:    execution        Version:      6.1u5       CC:    None defined
        Status:       NEW              Priority:     P4
      Resolution:                     Issue type:    DEFECT
                                   Target milestone: ---
      Assigned to:    pollinger (pollinger)
      QA Contact:     pollinger
          URL:
       * Summary:     pid file should not have execute rights
   Status whiteboard:
      Attachments:

     Issue 2721 blocks:
   Votes for issue 2721:


   Opened: Wed Sep 10 02:28:00 -0700 2008 
------------------------


When tight integration is used, pid files containing the application's process
id are created in tmpdir. These pid files have execute rights.

   ------- Additional comments from crei Fri Sep 12 05:36:57 -0700 2008 -------
Problem can be reproduced with qrsh -inherit ...

>qstat -help | head -1
GE 6.1u5 (build 20080912) and also N1GE 6.0u13

1) create tight_pe
>qconf -ap tight_pe
pe_name           tight_pe
slots             1000
user_lists        NONE
xuser_lists       NONE
start_proc_args   /bin/true
stop_proc_args    /bin/true
allocation_rule   $round_robin
control_slaves    TRUE
job_is_first_task FALSE
urgency_slots     min

2) create tight.q
>qconf -aq tight.q
qname                 tight.q
hostlist              host_A host_B
pe_list               make tight_pe
tmpdir                /tmp/test
shell                 /bin/csh
slots                 10

=> Create /tmp/test on the hosts from hostlist as root with rwx permissions for
everyone

3) Submit tight pe job which requests pe
> qsub -pe tight_pe 4 $SGE_ROOT/examples/jobs/sleeper.sh 6000
Your job 1 ("Sleeper") has been submitted

=> Wait for running job:
> qstat -g t
job-ID  prior   name       user         state submit/start at       queue
                   master ja-task-ID
--------------------------------------------------------------------------------------------------------------------
      1 0.55500 Sleeper    admin_user     r     09/12/2008 14:16:30
tight.q@host_A                 SLAVE

tight.q@host_A                 SLAVE
      1 0.55500 Sleeper    admin_user     r     09/12/2008 14:16:30
tight.q@host_B                 MASTER

tight.q@host_B                 SLAVE

tight.q@host_B                 SLAVE

4) Change $HOME/.cshrc and "add umask 0027" line
   open new terminal and create a file the default permissions should be:
   -rw-r-----

5) Submit parallel tasks with qrsh -inherit ...
>setenv JOB_ID 1
>setenv SGE_TASK_ID 1
> qrsh -inherit host_A $SGE_ROOT/examples/jobs/sleeper.sh 600
Here I am. Sleeping now at: Fri Sep 12 14:20:41 MEST 2008

6) go to tmp/test directory where job is running ...
# pwd
/tmp/test
# ls -la
total 32
drwxrwxrwx   3 root       root         185 Sep 12 14:20 .
drwxrwxrwt  37 root       sys         7969 Sep 12 14:20 ..
drwxr-xr-x   2 admin_user staff        186 Sep 12 14:20 1.1.tight.q
# cd 1.1.tight.q/
# ls -la
total 24
drwxr-xr-x   2 admin_user staff        186 Sep 12 14:20 .
drwxrwxrwx   3 root       root         185 Sep 12 14:20 ..
-rwxr-----   1 admin_user staff          4 Sep 12 14:20 pid.1.host_A

=> The permissions of the pid file are wrong! It should be 644 and not depend on
users shell configuration!



WORKAROUND: The users shell environment have to set the correct umask!

Change History (0)

Note: See TracTickets for help on using tickets.