We have about 30 odd Mikrotik depoyed in various locations for various purposes. The above script works in almost all locations but on some routers it fails with the error message “Not Enough Permitions”.
The very same OS version works fine with this script in other places. This error occurs only in few installations.
Check to make sure the User executing the script has sufficient rights to do so. It may be created by Admin, but someone else may be set to run it in those problem locations.