BEGIN:VCALENDAR
PRODID:-//vBulletin 6//EN
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VEVENT
UID:221628e6-b6d6-4056-a183-dfa1f2a73dab
DTSTAMP:20260425T121731Z
SUMMARY:Agent 2 is not deleting files on Windows Server 2019.
DESCRIPTION:We have some triggers which keep an eye on logfile sizes. If a 
 treshold is reached\, the file is backupped and deleted.\nThis works fine 
 with Zabbix Agent on the same server. Zabbix Agent 2 fails.\nEnableRemoteC
 ommands etc is set\, and after upgrading to Zabbix 6 AllowKey=system.run\n
  \n\nZabbix Agent2\, running on System Account\, reports back: Success. Ho
 wever\, the file is not deleted.\nLog:\n2023/02/15 15:26:18.078063 execute
 d direct exporter task for key 'system.run[del "C:\\Program Files\\Zabbix 
 Agent 2\\zbx-winupdate.log"\ntimeout /t 5\,nowait]'\n2023/02/15 15:26:18.0
 84986 received [{"response":"success"\,"info":"processed: 1\; failed: 0\; 
 total: 1\; seconds spent: 0.000084"}] from [x.x.x.50:10051]\n2023/02/15 15
 :26:18.084986 received [{"response":"success"\,"info":"processed: 1\; fail
 ed: 0\; total: 1\; seconds spent: 0.000029"}] from [x.x.x.51:10051]\n2023/
 02/15 15:26:18.084986 sending passive check response: '1' to 'x.x.x.51'\n2
 023/02/15 15:26:18.309501 received passive check request: 'system.run[echo
  "X">"C:\\Program Files\\Zabbix Agent 2\\zbx-winupdate.log"\,nowait]' from
  'x.x.x.51'\n2023/02/15 15:26:18.309501 [1] processing update request (1 r
 equests)\n\n​Conf:\nAllowKey=system.run\n \n\nScript: Zabbix Agent:\ndel
  "C:\\Program Files\\Zabbix Agent 2\\zbx-winupdate.log"\ntimeout /t 5​\n
 \n-A script which executes taskkill is executed without problems.\n-System
  has full rights to the Zabbix Agent 2 folder\n-Running the service with a
  domain Admin account doesn't solve the issue\n\nWhat am I doing wrong?
URL:https://www.zabbix.com/forum/node/459530
DTSTART;VALUE=DATE:20230215
END:VEVENT
END:VCALENDAR
