Ad Widget

Collapse

Permission Denied while using script for sending emails

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • paulhex
    Junior Member
    • Oct 2015
    • 2

    #1

    Permission Denied while using script for sending emails

    Hello everyone,

    I am trying to use this script: zabbix-alert-smtp.sh to send email notifications fro zabbix

    The script runs properly when executed from the command line. unfortunately it does not work when used from zabbix.

    Here is the error message i get:
    25928:20151020:172014.754 query without transaction detected
    25928:20151020:172014.754 query [txnlev:0] [update alerts set retries=1,error='/usr/lib/zabbix/alertscripts/zabbix-alert-smtp.py: [13] Permission denied' where alertid=63]
    25928:20151020:172014.755 In execute_action(): alertid [64] mediatype [1]

    I can see it is permissions problem but for some reason i cannot figure it out
    So far i tried:
    1. Changing permissions to the script chmod and chown to zabbix
    2. Moving the script to a different folder

    I wonder if this is not SELinux blocking it.

    Any help will be greatly appreciated.

    Regards
    Paul
  • paulhex
    Junior Member
    • Oct 2015
    • 2

    #2
    It was the SeLinux on CentOS, i hope this helps someone one day
    Cheers!
    Paul

    Comment

    Working...