Bug 115 - TORQUE 2.5.4 does not honor -W umask
: TORQUE 2.5.4 does not honor -W umask
Status: RESOLVED FIXED
Product: TORQUE
pbs_mom
: 2.5.x
: PC Linux
: P5 normal
Assigned To: Ken Nielson
:
:
:
  Show dependency treegraph
 
Reported: 2011-03-04 18:47 MST by Michael Jennings
Modified: 2011-03-09 09:10 MST (History)
3 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Michael Jennings 2011-03-04 18:47:07 MST
Output and error files created by torque 2.5.4 seem to always have permissions
0600 regardless of the value supplied to "#PBS -W umask=0xxx" (both 0000 and
0777 resulted in permissions of 0600).

This worked correctly in torque 2.4.9.
Comment 1 Chris Samuel 2011-03-09 01:17:03 MST
Hmm, it looks like this code has got lost between 2.4 and 2.5 in:

src/resmom/start_exec.c 

according to this diff:

       @@ -6052,11 +6283,6 @@
       }
     }

-       if (pjob->ji_wattr[(int)JOB_ATR_umask].at_flags & ATR_VFLAG_SET)
-               {
-               old_umask =
umask(pjob->ji_wattr[(int)JOB_ATR_umask].at_val.at_long);
-               }
-       
        /* open file */

        fds = open(path, mode, 0666);


Looks like it went away in trunk in commit 3477 on March 1st 2010.

This was the only mention of JOB_ATR_umask in the pbs_mom code prior to 2.5,
now there is none.
Comment 2 David Beer 2011-03-09 08:59:11 MST
Hmmmm....it looks like this code was lost when a merge occurred from 2.4. I
will fix this and check it in.

David
Comment 3 David Beer 2011-03-09 09:10:47 MST
This fix has been tested and checked in. -W umask=... works again and has been
checked in to 2.5, 3.0, and trunk. It appears to be still present in 2.4