Debian Linux running on TS-7880 Arm Board; Cannot run shell scripts with non-root user

1

Here is the snippet of the script that I am trying to run some shell scripts on a TS7800 Arm Board through a non-root user:

echo    > /dev/ttts4
    echo "    `hostname`" > /dev/ttts4;
    echo "`/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print
$1}' `" > /dev/ttts4;
    # read ns
        ns=`/usr/local/bin/peek8 0xe8000011 | sed 's/^0x//'`

    let "noise_source = ${ns} & 0x00000001"

    if [ $ns -eq 1 ]; then
     echo "NS:ON" > /dev/ttts4
     /usr/local/bin/peekpoke 32 0xe8000010 0x00000100 > /dev/null
    else
     echo "NS:OFF" > /dev/ttts4
     /usr/local/bin/peekpoke 32 0xe8000010 0x00000000 > /dev/null
    fi

Trying to write to /dev/ttts4 and a non-root gives me "permission denied" error. Running peek8 and peekpoke commands gives me segmentation fault. I can get it the script by changing the permissions for each of these, but i am wondering if there is another way to do it. My final goal is to be able to run such scripts through a webpage.

Any help is greatly appreciated Thanks

debian
webserver
apache-http-server
arm
asked on Super User Mar 2, 2013 by user203530 • edited Mar 2, 2013 by terdon

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0