ar-/incron

incrond dies when creating subfolder

Closed this issue · 1 comments

Hello,

I run incron (0.5.12-1+deb10u1 amd64) on debian 10. This is my incrontab:

/root/incron	IN_CREATE,IN_ISDIR	/usr/local/bin/incron_folder.sh $@/$#
/root/incron/file*	IN_CLOSE_WRITE,IN_MOVED_TO	/usr/local/bin/incron_file.sh $@/$#

And dumb scripts:
/usr/local/bin/incron_file.sh

#!/bin/bash
echo "incron_file: $1" >> /tmp/log

/usr/local/bin/incron_folder.sh

#!/bin/bash
echo "incron_folder: $1" >>/tmp/log

When i create new files in /root/incron folders these are working as expected:

root@debian:~/incron# touch file_1
root@debian:~/incron# touch file_2

journalctl says:

Jul 12 12:29:00 debian incrond[29053]: PATH (/root/incron) FILE (file_1) EVENT (IN_CREATE)
Jul 12 12:29:00 debian incrond[29053]: (root) CMD (/usr/local/bin/incron_folder.sh /root/incron/file_1)
Jul 12 12:29:06 debian incrond[29053]: PATH (/root/incron) FILE (file_2) EVENT (IN_CREATE)
Jul 12 12:29:06 debian incrond[29053]: (root) CMD (/usr/local/bin/incron_folder.sh /root/incron/file_2)

But when i creating directory - incrond dies:

root@debian:~/incron# mkdir dir_1

Jul 12 12:29:11 debian incrond[29053]: PATH (/root/incron) FILE (dir_1) EVENT (IN_CREATE,IN_ISDIR)
Jul 12 12:29:12 debian systemd[1]: incron.service: Main process exited, code=killed, status=11/SEGV
Jul 12 12:29:12 debian systemd[1]: incron.service: Failed with result 'signal'.

I just found that this was already solved in 0.5.12 2020-12-03 version, but it still does not work :(