Operating System - HP-UX
1838571 Members
3280 Online
110128 Solutions
New Discussion

Re: executing script problem

 
Luca Frigatti
Contributor

executing script problem

Hi all!!
we have a problem when we try to execute this script :
#!/usr/bin/sh
export ORACLE_HOME=/u01/app/oracle/product/8.1.6
export ORACLE_SID=SQLCOMM
export LD_LIBRARY_PATH=/opt/cobol/coblib:$ORACLE_HOME/lib
export T4VBTS=displi
export TEMPOR=/u01/axioma/s5lire/tmp
export PATH=$PATH:/u01/app/oracle/product/8.1.6/bin:/usr/ccs/bin:/opt/cobol/bin::/usr/lib:.


numdis=`ps -fu $T4VBTS |grep rtsora |grep -ic "DISPAT"`

if test $numdis -eq 0
then
rm $TEMPOR/DISPAT.his
rm $TEMPOR/DISPAT.err
su $T4VBTS -c "nohup rtsora DISPAT 1> $TEMPOR/DISPAT.his 2> $TEMPOR/DISPAT.err & "
fi

The error we get is the following :
virgo# nohup: rtsora: Permission denied

The user permissions seems correct and the permission on the directory where users read and write are 777.
Thanks in advance for your help and your support.
Luca
4 REPLIES 4
John Carr_2
Honored Contributor

Re: executing script problem

Hi

put argument -x at end of first line and feed back to us the output.

cheers
John.
Jeff Schussele
Honored Contributor

Re: executing script problem

Think your problem is in your su command.
Does the user running this have perms to su to user "displi" ?

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
John Carr_2
Honored Contributor

Re: executing script problem

can you add this line into the script after the PATH line

echo $T4VBTS


try removing the quotes around DISPAT


also try this from the command line


ps -fu displi |grep rtsora |grep -ic DISPAT

what the outcome ?

cheers
John.

Jordan Bean
Honored Contributor

Re: executing script problem

It appears that displi doesn't have permission to invoke rtsora. What do these show:

su displi -c 'ls -l $(which rtsora)'
su - displi -c 'ls -l $(which rtsora)'