LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 923|回复: 0

帮忙看下脚本

[复制链接]
发表于 2008-6-18 16:56:10 | 显示全部楼层 |阅读模式
#!/bin/sh



UPATH=/sirsi/sirsi/Unicorn/Config/upath; export UPATH

PATH=/sirsi/sirsi/Unicorn/Bincustom:/sirsi/sirsi/Unicorn/Bin:/usr/local/sirsi/bin{PATH}; export PATH

SIRSI_LANG=ENGLISH; export SIRSI_LANG

KRB_CONF=; export KRB_CONF



ORACLE_HOME=/sirsi/oracle/product/10.2.0; export ORACLE_HOME

ORACLE_SID=unic; export ORACLE_SID

LIBPATH=/usr/local/sirsi/Oracle_client/10.2.0.2:/sirsi/oracle/product/10.2.0/lib32:/usr/local/lib; export LIBPATH



NLS_LANG=AMERICAN_AMERICA.AL32UTF8; export NLS_LANG



NLS_SORT=SCHINESE_PINYIN_M; export NLS_SORT



ICU_DATA=/sirsi/sirsi/Unicorn/Icu/unicode/lib/icu/2.4; export ICU_DATA



status=0

if [ -z "${PATH_INFO}" ]; then

  echo "Content-type: Text/html"

  echo

  echo "<BODY BGcolor=#FFFFFF>"

  echo "</BODY>"

elif [ "${PATH_INFO}" = "/0/1/0" ]; then

  echo "Content-type: Text/html"

  echo

  echo "<head>"

  echo "<meta http-equiv=refresh content=\"15; URL=/uhtbin/webcat\">"

  echo "</head>"

  echo "<body bgcolor=#FFFFFF>"

  echo "<H1>WebCat Has Moved.</H1>"

  echo "This service is now available at <a href=/uhtbin/webcat><b>"

  echo "/uhtbin/webcat</b></a>."

  echo "You will be forwarded automatically in a few seconds."

  echo "</body>"

else

  umask 000

set > /tmp/set.out

echo $SHELL >> /tmp/set.out

  cgiopac >> /tmp/set.out

  status=$?

fi

exit ${status}


错误提示如下:
###################################################################################################################

The only thing I found, was that sometimes I got the below error under the root user. We should ask the site if they have set any shell restrictions or operate test in a zone or virtual environment.



sh: cd: 0403-019 The operation is not allowed in a restricted shell.



Eg.



# cd ..

sh: cd: 0403-019 The operation is not allowed in a restricted shell.

# pwd

/usr/local/apache2/cgi-bin

#

# cd /usr/local/apache2

sh: cd: 0403-019 The operation is not allowed in a restricted shell.

# echo $SHELL

/usr/bin/ksh
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表