Re: Scripting Errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2003.06.30 14:02, Ryan McDougall wrote:
Hello All,

I have a problem trying to run a scrip in RH 9.0 it is running fine in RH 8.0 but I get TTY permission errors in the logs. I used 'chkconfig -add folding' to add the service to the right startup level (well the ones I wanted it in anyway). I figure that the script will be useful to look at, so it is below. Please any suggestions will be greatly appreciated.

#!/bin/sh
#chkconfig: 345 99 99
#description: Start | Stop | Restart | (Check the) Status of the FAH
Linux console client
source /etc/rc.d/init.d/functions
FAH="/home/mcdougrs/folding/FAH3Console-LinuxB.exe"
cd /home/mcdougrs/folding/ >/dev/tty6
RETVAL=1
case "$1" in
start)
echo -n "Starting Folding@xxxx client ... "
su mcdougrs -c "$FAH >/dev/tty6 &"
RETVAL=$?
;;
stop)
echo -n "Stopping Folding@xxxx's FAH3Console-Linux. exe ... "
killproc FAH3Console-Linux.exe
RETVAL=$?
;;
restart)
$0 stop
/usr/bin/sleep 1
$0 start
RETVAL=$?
;;
status)
status FAH3Console-Linux.exe
RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
exit $RETVAL



Thanx, Ryan


Redirecting standard output to the sixth virtual terminal (/dev/tty6) is not appropriate. Remove references to ">/dev/tty6". It may have worked in the past because you happened to have write permission incidently. Try "ls -al /dev/tty{,?}" to see ownerships and permissions in context. You should have read or write access only to those ttys to which you are currently logged in. Use "ps auxf" to show the active processes and their ttys.

If "mcdougrs" is your personal account, then I suggest that you create special user and group accounts that can own the Folding@xxxx process (as it runs) in order to minimize security breaches. Do not mistakenly let the special user or group have write access to the Folding@xxxx executable file.

-----------------
major@xxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux