I want Netwatch to disable/enable a scheduler for up and down events. However, this doesn’t work. The execution fails with the following error:
script, error executing script from netwatch failed, please check it manually
script, error,debug (netwatch:type: simple, host: 10.30.0.50) failure: user’s policy does not allow to edit this script
My netwatch configuration:
add disabled=no down-script="/system scheduler set toggle-wg-peer disabled=no" host=10.30.0.50 src-address=192.168.40.1 test-script="" type=simple up-script="/system scheduler set toggle-wg-peer disabled=yes"
Netwatch is limited to read,write,test,reboot script policies. If the owner of the script does not have enough permissions to execute a certain command in the script, then the script will not be executed. If the script has greater policies than read,write,test,reboot - then the script will not be executed as well, make sure your scripts do not exceed the mentioned policies.
So it seems, from this info, your user has either not enough, either too much rights.
Can you put those up/down scripts in real scripts and make sure the correct policy is granted on those scripts ?
What happens then ?