1

Need help with user rights (Permission denied)

view story
linux-howto

http://www.unix.com – I have a script that do read data for Munin Graph . My problem is that it have some reading problems, and I do not know how to fix it. script traf.sh (its not the complete script) Code: #!/bin/sh PORT="80" NETDEVICE="eth0" IPTRAFlogdir="/var/log/iptraf" LOG="$IPTRAFlogdir/tcp_udp_services-${NETDEVICE}.log" TRAFFICIN=$(awk '$1 ~ port {p=$11}END{if(length(p)) print p}' port=$PORT $LOG) whoami echo "trafficin.value ${TRAFFICIN}" Running it as root ./traf.sh gives: Code: root trafficin.value 653 Running it as Mu (HowTos)