Scrip permission error

Hi all,

I’m trying to use the following script taken from Mikrotik wiki page https://wiki.mikrotik.com/wiki/Wake_on_Lan_before_connection_to_Remote_Desktop :

:foreach A in=[/ip firewall address-list find name=wakeOnLan] do={
if ([/ip firewall address-list get $A list]=“wakeOnLan”) do={
/system script add name=pinging source={
if ([/ping $A count=2] = 0) do={
:log info “Sending WoL to $[/ip firewall address-list get $A address]”
/tool wol mac=11:22:33:44:55:66:77 interface=ether3
:log info “Removing IP $[/ip firewall address-list get $A address] from list”
/ip firewall address-list remove $A
}
}
}
}

But every time I try to execute it i get the “script error: not enough permissions (9)”.

Version of RouterOS is: 6.39.2

Can someone provide some information on what could be causing the fault ?

BR,
Geronimo

Give the script full permissions. Also, make sure it’s owned by a user with full access.
Screen Shot 2017-07-18 at 9.11.56 AM.png

Hi Dave

Thanks for the quick response, that did the trick. It’s working now.

…all you need to do now is post a sign somewhere, something like ~~ <3 Welcome to hackers’ paradise €> ~~
whenever you hit the wall of your knowledge or boss’s schedule, best thing you can do is to whore with good ol’ yes to all.

/tool wol command requires “test” permissions, but note if your script also need to “read” some data or even “write” it.