Package: iwatch
Version: 0.2.2-9
Severity: important

Hello,

I'm setting up sending xmpp in a test environment and realized that:

1) Running iwatch from the system, sending xmpp does not happen.

root@debian11:/var/log# /etc/init.d/iwatch status
● iwatch.service - realtime filesystem monitoring program using inotify
     Loaded: loaded (/lib/systemd/system/iwatch.service; enabled; vendor 
preset: enabled)
     Active: active (running) since Tue 2021-09-21 23:26:11 -03; 4min 2s ago
       Docs: man:iwatch
    Process: 537 ExecStart=/usr/bin/iwatch -f $CONFIG_FILE -p /run/iwatch.pid 
-d (code=exited, status=0/SUCCESS)
   Main PID: 690 (iwatch)
      Tasks: 1 (limit: 1133)
     Memory: 23.3M
        CPU: 169ms
     CGroup: /system.slice/iwatch.service
             └─690 /usr/bin/perl -T /usr/bin/iwatch -f /etc/iwatch/iwatch.xml 
-p /run/iwatch.pid -d

set 21 23:26:10 debian11 systemd[1]: Starting realtime filesystem monitoring 
program using inotify...
set 21 23:26:11 debian11 systemd[1]: Started realtime filesystem monitoring 
program using inotify.
set 21 23:26:11 debian11 su[890]: (to nobody) root on none
set 21 23:26:11 debian11 su[890]: pam_unix(su:session): session opened for user 
nobody(uid=65534) by (uid=0)
set 21 23:26:12 debian11 su[890]: pam_unix(su:session): session closed for user 
nobody

2) Running the same command line shown above with "/etc/init.d/iwatch status", 
removing the daemon "-d" 
parameter and inserting the verbose "-v" parameter, the send works. Without 
changing anything in the configuration file.

root@debian11:/var/log# /usr/bin/perl -T /usr/bin/iwatch -f 
/etc/iwatch/iwatch.xml -p /run/iwatch.pid -v
Watch /bin
Watch /sbin
Watch /etc
Watch /lib
Watch /tmp
[21/set/2021 23:31:45] IN_CREATE /tmp/2
[21/set/2021 23:31:45] * Command: (echo iWatch: IN_CREATE /tmp/2;w;ps 
-ef)|sendxmpp -t user@example
[21/set/2021 23:31:45] * Send email to root@localhost
[21/set/2021 23:31:49] IN_CLOSE_WRITE /tmp/2
[21/set/2021 23:31:49] * /tmp/2 is closed
[21/set/2021 23:31:49] * Command: (echo iWatch: IN_CLOSE_WRITE /tmp/2;w;ps 
-ef)|sendxmpp -t user@example
[21/set/2021 23:31:49] * Send email to root@localhost

Regards


-- System Information:
Debian Release: 11.0
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-8-amd64 (SMP w/1 CPU thread)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8), 
LANGUAGE=pt_BR:pt:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages iwatch depends on:
ii  exim4-daemon-light [mail-transport-agent]  4.94.2-7
ii  init-system-helpers                        1.60
ii  libevent-perl                              1.27-1+b2
ii  liblinux-inotify2-perl                     1:2.2-2+b1
ii  libmail-sendmail-perl                      0.80-1.1
ii  libxml-simpleobject-libxml-perl            0.53-3
ii  lsb-base                                   11.1.0
ii  perl                                       5.32.1-4+deb11u1

iwatch recommends no packages.

Versions of packages iwatch suggests:
ii  sendxmpp    1.24-3
pn  yowsup-cli  <none>

-- Configuration Files:
/etc/iwatch/iwatch.xml changed:
<?xml version="1.0" ?>
<!DOCTYPE config SYSTEM "/etc/iwatch/iwatch.dtd" >
<config charset="utf-8">
  <guard email="iwatch@localhost" name="iWatch"/>
  <watchlist>
    <title>Operating System</title>
    <contactpoint email="root@localhost" name="Administrator"/>
    <path type="single" syslog="on">/bin</path>
    <path type="single" syslog="on">/sbin</path>
    <path type="single">/etc</path>
    <path type="recursive">/lib</path>
    <path type="exception">/lib/modules</path>
  </watchlist>
  <watchlist>
    <title> Apenas um teste</title>
    <contactpoint email="root@localhost" name="Teste"/>
    <path type="single" syslog="on" exec="(echo %p: %e %f;w;ps -ef)|sendxmpp -t 
user@example">/tmp</path>
  </watchlist>
</config>


-- no debconf information

Reply via email to