Community discussions

 
kostikbel
just joined
Topic Author
Posts: 13
Joined: Tue May 27, 2014 1:16 pm

Script permissions

Thu Sep 20, 2018 6:33 pm

I have tool netwatch configured to run some script, which consists of the only command to send email:
name="dlap1-down" owner="kostik" policy=read,write,policy,test,sensitive 
     dont-require-permissions=no run-count=0 
     source=/tool e-mail send subject="dlap1 down" to=kostik@tom.home 
This results in error
18:20:03 script,error could not run script dlap1-down: not enough permissions
and of course no email is sent.

What permissions are needed for email ?
 
Borage
Member Candidate
Member Candidate
Posts: 170
Joined: Sun Sep 26, 2004 10:19 pm

Re: Script permissions

Fri Sep 21, 2018 5:07 am

I have a similar issue after upgrading to 6.43.1. I have a script running at startup from the scheduler and now my log is full of errors.

/system scheduler
add disabled=no interval=10m name=Schedule1 on-event=Script1 policy=read,write start-time=startup

The above schedule configuration worked with RouterOS 6.42.x.

/system scheduler
add disabled=no interval=10m name=Schedule1 on-event=Script1 policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-time=startup

I changed the permission to get rid of the following error message. I'm not sure what caused the problem.

00:57:00 script,error could not run script Script1: not enough permissions

Edit: Obviously, the policy must match each other in both the scheduler and the script.
 
mcskiller
newbie
Posts: 37
Joined: Mon Feb 13, 2012 7:12 am
Location: Argentina
Contact:

Re: Script permissions

Wed Oct 17, 2018 4:20 am

Same problem here, before last update netwatch with scripts it was working perfectly. Now in 6.43.2 when a host became down and launch and script it returns :
script,error could not run script hd_up: not enough permissions
Any news from mikrotik ??
 
2frogs
Long time Member
Long time Member
Posts: 540
Joined: Fri Dec 03, 2010 1:38 am

Re: Script permissions

Wed Oct 17, 2018 4:59 am

For some time now:
viewtopic.php?t=134538

In short, Netwatch can only execute scripts with "write, read, test, reboot" policies. Remove all other policies from your scripts.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 5940
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Script permissions

Wed Oct 17, 2018 10:58 am

Or use dont-require-permissions=yes

Who is online

Users browsing this forum: No registered users and 60 guests