Running a command as root
I have GKrellm running on my system, and have created two buttons to change the throttling of the CPU. The two buttons execute the commands:
/home/falcon56215/CPUpowersave.sh
/home/falcon56215/CPUperformance.sh
which are script files that contain the following commands:
echo 'powersave' > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 'performance' > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
The problem is these can be executed as root and work fine, but when I execute as a regular user like GKrellm does, I get:
[falcon56215@TuxBox ~]$ ./CPUperformance.sh
./CPUperformance.sh: line 1: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor: Permission denied
I have tried chmod 4755 CPUperformance.sh, and it is owned by root, but I still get the same error. Any ideas?
|