linux - Running a shell subscript as the parent script's user -


if want call shell script within main script file particular user, how go doing it? child script seems loose context of user running , haven't found useful sub-scripting techniques.

ex: war-install.sh

if [ ! -d /opt/tomcat/ ]    ./tomcat-install-files/install.sh fi 

the problem here if run war-install.sh root or sudo command, ./tomcat-install-files/install.sh seems lose sudo/root context. how can rectify this?

thanks!

i agree roosh weird going on. in general run command user:

sudo -l <user> <cmd>


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -