M
maxshop
Hello Group,
I have a shell script (on AIX 5.2) that looks something like this:
/* ---- pg_format.sh Begin ---- */
#!/usr/bin/ksh
PAGE1FORM=$1
PAGE2FORM=$2
/usr/bin/perl -014pe's|^|(/Page:\s
+1\s/?"'$PAGE1FORM'\n":"'$PAGE2FORM'\n")|e'
/* ---- pg_format.sh End ---- */
There is another script called: main.sh, which is being invoked from
our ERP & the report data is being passed to it, which is captured in
the $INFILE (as "cat > $INFILE"). The pg_format.sh script is then
called from main.sh, as:
pg_format.sh $form1 $form2 < $INFILE > $OUTFILE
The function of the pg_format.sh script is to insert the value of
$form1 on the first line of page 1, and the value of $form2 on the
first line of page 2 and onwards.
Now, whenever I run a report in our ERP system & invoke main.sh, which
in turn invokes pg_format.sh, I get an error: "No -e allowed in setuid
scripts". However, when I run main.sh from the command line & pass the
report data stream to it, the pg_format.sh works just fine without any
errors. This is what I find confusing.
Secondly, this is only happening on our TEST AIX machine. On
Production, it works just fine when invoked thru our ERP. The AIX
version is the same, the ERP version, setup, etc. is the same, the
file/directory locations, owners, permissions, etc. are exactly the
same. The version of perl (v5.8.0) is the same on both.
Not sure why am I getting this error. I also tried the -U option
("allow unsafe operations"), but that didn't help.
Any suggestions?
Thanks for any help.
S
I have a shell script (on AIX 5.2) that looks something like this:
/* ---- pg_format.sh Begin ---- */
#!/usr/bin/ksh
PAGE1FORM=$1
PAGE2FORM=$2
/usr/bin/perl -014pe's|^|(/Page:\s
+1\s/?"'$PAGE1FORM'\n":"'$PAGE2FORM'\n")|e'
/* ---- pg_format.sh End ---- */
There is another script called: main.sh, which is being invoked from
our ERP & the report data is being passed to it, which is captured in
the $INFILE (as "cat > $INFILE"). The pg_format.sh script is then
called from main.sh, as:
pg_format.sh $form1 $form2 < $INFILE > $OUTFILE
The function of the pg_format.sh script is to insert the value of
$form1 on the first line of page 1, and the value of $form2 on the
first line of page 2 and onwards.
Now, whenever I run a report in our ERP system & invoke main.sh, which
in turn invokes pg_format.sh, I get an error: "No -e allowed in setuid
scripts". However, when I run main.sh from the command line & pass the
report data stream to it, the pg_format.sh works just fine without any
errors. This is what I find confusing.
Secondly, this is only happening on our TEST AIX machine. On
Production, it works just fine when invoked thru our ERP. The AIX
version is the same, the ERP version, setup, etc. is the same, the
file/directory locations, owners, permissions, etc. are exactly the
same. The version of perl (v5.8.0) is the same on both.
Not sure why am I getting this error. I also tried the -U option
("allow unsafe operations"), but that didn't help.
Any suggestions?
Thanks for any help.
S