Community discussions

MikroTik App
 
sims
just joined
Topic Author
Posts: 6
Joined: Wed Jun 08, 2016 8:30 pm

Scripts cannot run with permission denied V7.13.4

Mon Feb 19, 2024 6:48 pm

Hello all,
After upgrading to v7.13 from v7.11 the script from dynu is not running with the following error: Couldn't start task: cannot open file: permission denied
The same script was running the last 5 years without any issue, owner of script is admin with full permissions

Thank you
Simos
You do not have the required permissions to view the files attached to this post.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12014
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Scripts cannot run with permission denied V7.13.4

Mon Feb 19, 2024 6:51 pm

1) Read changelog before update. And not only the one for the 7.13, but all changelogs between 7.11 and 7.13.

2) If work, why upgrade?

3) Add "ftp" policy.
 
borisknt76
just joined
Posts: 1
Joined: Tue Feb 20, 2024 2:26 pm

Re: Scripts cannot run with permission denied V7.13.4

Tue Feb 20, 2024 2:38 pm

We have the similar problem. The difference is that we have an external script which uploads reset.auto.rsc file. We upload file from a user with group full. This file contains:
/system backup save encryption=aes-sha256 password=XXXXXX name=rollback.backup
/system reset-configuration skip-backup=yes no-defaults=yes keep-users=yes run-after-reset=prebackup.rsc

And each line of this script fail with “script error: not enough permissions (9)” error. Our configuration synchronizer is broken. Is there a solution for our issue?

Appreciate for your help.
Last edited by borisknt76 on Tue Feb 20, 2024 4:24 pm, edited 1 time in total.
 
User avatar
mozerd
Forum Veteran
Forum Veteran
Posts: 891
Joined: Thu Oct 05, 2017 3:39 pm
Location: Canada
Contact:

Re: Scripts cannot run with permission denied V7.13.4

Tue Feb 20, 2024 3:28 pm

3) Add "ftp" policy.
I run the dynu script and do not have ftp policy checked and my script runs without issue.
@rextended ... so why are you stateing point # 3) ?

I have not seen the OP's script .... my dynu script is below:
/system script add dont-require-permissions=no name=Dynu owner=aaaa policy=read,write,policy,test source=":local ddnsuser \"zzzzz\"\
\n:local ddnspass \"^XxXxXxXxXxXXXXz\"\
\n:local ddnshost \"blaNNN.myddns.rocks\"\
\n\
\n:local currentIP ([/tool fetch url=\"https://api.ipify.org\" as-value output=user]->\"data\")\
\n:local dnsIP [:resolve \$ddnshost]\
\n:if (\$currentIP != \$dnsIP) do={\
\n :local update \"https://api.dynu.com/nic/update\?userna ... $currentIP\"\
\n /tool fetch url=\$update keep-result=no\
\n :log info \"DYNU \$ddnshost updated: old IP was \$dnsIP and new IP is \$currentIP\"\
\n}\
\n"
Last edited by mozerd on Tue Feb 20, 2024 3:46 pm, edited 1 time in total.
 
jaclaz
Long time Member
Long time Member
Posts: 667
Joined: Tue Oct 03, 2023 4:21 pm

Re: Scripts cannot run with permission denied V7.13.4

Tue Feb 20, 2024 3:44 pm

What I did when facing similar issues was to give the script all permissions (policies) and - when it worked - starting removing them one by one until the script stopped working to find which ones were needed.
I guess it can be defined "permissions brute-forcing" :shock:

In my case it was "/tool traffic-generator inject " command requiring the "sniff" one:
viewtopic.php?t=186010#p1047237
 
sims
just joined
Topic Author
Posts: 6
Joined: Wed Jun 08, 2016 8:30 pm

Re: Scripts cannot run with permission denied V7.13.4

Tue Feb 20, 2024 10:53 pm

Hello all,
FTP is needed to version 7.13 for dynu script to work
Thank you all for your input
You do not have the required permissions to view the files attached to this post.
 
mayuranimation
just joined
Posts: 2
Joined: Tue Feb 20, 2024 11:33 pm

Re: Scripts cannot run with permission denied V7.13.4

Tue Feb 20, 2024 11:54 pm

Hello all,
FTP is needed to version 7.13 for dynu script to work
Thank you all for your input
Please Suggest me any one how to fix netwatch host script

scrip some text by mask Image
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12014
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Scripts cannot run with permission denied V7.13.4

Wed Feb 21, 2024 4:11 pm

@mozerd
@rextended ... so why are you stateing point # 3) ?

@sims
FTP is needed to version 7.13 for dynu script to work
Thank you all for your input
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12014
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Scripts cannot run with permission denied V7.13.4

Wed Feb 21, 2024 4:14 pm

Please Suggest me any one how to fix netwatch host script
0) Do not hijack other people topic.

1) Read changelog before update. And not only the one for the <version you use>, but all changelogs between <previous version> and <version you use>.

2) If work, why upgrade?

3) Add "ftp" policy on the script that netwatch call.
 
mayuranimation
just joined
Posts: 2
Joined: Tue Feb 20, 2024 11:33 pm

Re: Scripts cannot run with permission denied V7.13.4

Wed Mar 06, 2024 11:14 pm

Please Suggest me any one how to fix netwatch host script
0) Do not hijack other people topic.

1) Read changelog before update. And not only the one for the <version you use>, but all changelogs between <previous version> and <version you use>.

2) If work, why upgrade?

3) Add "ftp" policy on the script that netwatch call.
Brother
can please more explain , where to add ftp policy , i'm too beginner plz help
thanks.....
 
jaclaz
Long time Member
Long time Member
Posts: 667
Joined: Tue Oct 03, 2023 4:21 pm

Re: Scripts cannot run with permission denied V7.13.4

Thu Mar 07, 2024 10:43 am

Look at the screenshot on the first post:
viewtopic.php?t=204784#p1057460

Get to that window in Winbox selecting the script.
Tick the box labeled "ftp" next to "Policy:"
Apply.
OK.
 
Rox169
Member
Member
Posts: 434
Joined: Sat Sep 04, 2021 1:47 am

Re: Scripts cannot run with permission denied V7.13.4

Fri Mar 15, 2024 8:49 am

Hi,

do we have any solution how to make NETWATCH with script work?

Who is online

Users browsing this forum: No registered users and 9 guests