Security
cancel
Showing results for 
Search instead for 
Did you mean: 

3rd party app. creates files as rw-rw-rw

 
SOLVED
Go to solution
nancy rippey
Trusted Contributor

3rd party app. creates files as rw-rw-rw

I have HPUX 11i servers that are running a third party softaware (Autosys) that is creating files as rw-rw-rw. The process is started from inetd. The umask is set to 022. Why are these files being created this way and is there a way to avoid creating these files with these permissions.

Thank you in advance.
nrip
2 REPLIES
Solution

Re: 3rd party app. creates files as rw-rw-rw

Nancy,

If you look in the shell code for the inetd startup progran /sbin/init.d/inetd you will see the following code:

mask=`umask`
umask 000

if [ -z "$INETD" ] || [ "$INETD" -ne 0 ]; then
[ -x /usr/sbin/inetd ] && /usr/sbin/inetd $INETD_ARGS
set_return
if [ $rval -eq 0 ]; then
echo "Internet Services started"
else
echo "Unable to start Internet Services"
fi
else
echo "Internet Services Daemon is disabled"
rval=2
fi

umask $mask

As you can see, when inetd is started, umask is set to 000. This is deliberate, and is supposed to make the umask for any daemon started by inetd neutral (well written daemons should never assume a umask anyway).

I don't know Autosys as a product, but a quick google suggests you can set a umask for autosys in /etc/auto.profile ?

Otherwise you could of course change this in the /sbin/init.d/inetd code, but you will need to be aware that this will affect all daemons started by inetd (with unknown consequences I guess), and any patches or updates to inetd may overwrite this. I guess it might also be possible to produce a small wrapper for autosys which is referenced in the /etc/inetd.conf file instead - not having autosys of course I can't suggest how you would go about that.

HTH

Duncan

HTH

Duncan
nancy rippey
Trusted Contributor

Re: 3rd party app. creates files as rw-rw-rw

Thank you for the reply. Exactly what I was looking for
nrip