Search code examples
node.jspermissionsopennms

permission problem with opennms running a nodejs script in notification


sorry english isn't my main language.

im a beginner at linux and im running a instalation of horizon 33 in a ubuntu 22.04 virtual machine.

what i wnat to do is that opennms runs this script when an outage is detected,

i wrote the command like this in the notificationCommands.xml

but when i try to test it, nothing happens

enter image description here

i also checked the notifd log and it has this error on.

enter image description here

thats why im guessing its a permission problem, but ican't find how to fix it

i've tried:
sudo chown opennms:opennms /run/user/1000/fnm_multishells/4015_1718717187249/bin/node

sudo chmod +x /run/user/1000/fnm_multishells/4015_1718717187249/bin/node

sudo chown opennms:opennms /home/mauri/Scripts/Helpers/app.js

sudo chmod +x /home/mauri/Scripts/Helpers/app.js

i've also tried to run another command like /usr/bin/curl to send a get request to an url to check if al least something could be run it worked fine


Solution

  • i managed to solve this, transforming the service account "opennms" to a normal one.