juniper error: could not open op script: Permission denied

Permission denied when trying to open an op script

Recently I was updating an op-script and uploaded it with a different user and got the following error:

How to fix op script: Permission denied

It seems when you upload the script the permissions are only allowed for that particular user and no one else is able to read this file therefore we would update the permissions for the file using chmod, I believe there are other ways you can fix this but this is what i quickly figured out, see below the solution:

Junos scripting in slax

If you are a newbie to the slax scripting here is an excellent online slax scripting engine and debug tool:

Junos Scripting references