unifios-utilities
unifios-utilities copied to clipboard
Permission denied, but only when running it in a script?
I have the following in /mnt/data/on_boot.d/10_CPUfan.sh:
killall -9 S04ubnt-fan-speed ubnt-fan-speed echo 1 >/sys/class/hwmon/hwmon0/device/pwm1_enable echo 1 >/sys/class/hwmon/hwmon0/device/pwm2_enable echo 75 >/sys/class/hwmon/hwmon0/device/pwm1 echo 75 >/sys/class/hwmon/hwmon0/device/pwm2
This works if i run it directy in SSH, but if I try to execute 10_CPUfan.sh i get:
/mnt/data/on_boot.d/10-CPUfan.sh
killall: S04ubnt-fan-speed: no process killed : no process killedpeed : Permission denied/10-CPUfan.sh: line 2: can't create /sys/class/hwmon/hwmon0/device/pwm1_enable : Permission denied/10-CPUfan.sh: line 3: can't create /sys/class/hwmon/hwmon0/device/pwm2_enable : Permission denied/10-CPUfan.sh: line 4: can't create /sys/class/hwmon/hwmon0/device/pwm1 : Permission denied/10-CPUfan.sh: line 5: can't create /sys/class/hwmon/hwmon0/device/pwm2
Any ideas? 10_CPUfan.sh is already set at 0755