setting a umask on a process

From: Bob Adams <adams_at_kodak.com>
Date: Mon, 04 Oct 1999 15:23:24 -0400 (EDT)

Hi,

here's the scenerio...

I am starting a Unigraphics plot queue manager in an init.d
script.

The plot queue manager plots hpgl files to a directory. The goal is to
have another non-root process read the hpgl files from
the directory and then delete them....

the problem I am having is how to set the process
file creation permissions. I have tried setting
a umask in the plot queue manager startup script...but
the best permissions I can get on the hpgl file
creation mask is 0644 (where umask = 000).

The non-root process can read the file, but cannot
delete it.

The startup script is as follows:

#
umask 000
#
[ -x $0 ] || exit # Execute permission check, if not, quietly exit.
#
# Unigraphics V13 Base directory, as entered during ug_install.
UGII_BASE_DIR=/packages/mcad/eds130 ; export UGII_BASE_DIR
#
# Unigraphics file system. Post V10, always native
UGII_FILE_SYSTEM=NATIVE ; export UGII_FILE_SYSTEM
#
# Directory containing the plotter executables.
UGII_PLOT_DIR=$UGII_BASE_DIR/plot ; export UGII_PLOT_DIR
#
# Directory containing the plot.queues file and generic plot files.
UGII_PLOTQ_DIR=/usr/spool/ugplot ; export UGII_PLOTQ_DIR
#
# Path variable for this script.
PATH=/sbin:/usr/bsd:/bin:/usr
#
# Plotter node for this daemon.
UGII_PLOT_NODE=`uname -n`
#
# Check if the daemon is there and executable.
if [ -x $UGII_PLOT_DIR/ugiipqd ]
then
   echo " Starting V13 plot daemon on `uname -n`"
   nohup $UGII_PLOT_DIR/ugiipqd > /var/tmp/ugiipqd.log 2>&1 &
fi

-- 
*******************************************************************
Bob Adams				Eastman Kodak Company
Unix System Support Engineer		800 Lee Road
Email: adams_at_Kodak.com			Mail Code 03117
Phone: (716) 722-3965			Rochester, NY  14650-3117
FAX:   (716) 722-1155
******************************************************************
Received on Mon Oct 04 1999 - 19:25:05 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:39 NZDT