Ad Widget

Collapse

Zabbix 6 Issue for root user when launching from zabbix_agent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fabienP
    Junior Member
    • Aug 2019
    • 1

    #1

    Zabbix 6 Issue for root user when launching from zabbix_agent

    Hello ALL.
    I use zabbix 6.0.X (i try several versions) as root on OracleOS (Redhat kind / yum).
    I configure the service to run as root. i use some usersParameters launching python script (python3 test.py). This script is very simple. It show the actual user launching the script and try to delete one file with os.remove

    Launching from SSH python3 my script is working well.
    Launching from zabbix_get i get a permission denied.
    All folders and subfolders are owned by root.

    Code:
    root
    Traceback (most recent call last):
      File "/opt/XXX/XXX_supervision_scripts/test.py", line 916, in <module>
        os.remove("/opt/XXX/XXX_supervision_scripts/logs/Archives/2023-10-18_16_17_30-Supervisions_Scripts_configure.log")
    PermissionError: [Errno 13] Permission denied: '/opt/XXX/XXX_supervision_scripts/logs/Archives/2023-10-18_16_17_30-Supervisions_Scripts_configure.log'
    Help will be wonderful​
Working...