incrond(8)
π incrond(8) β the inotify cron daemon, explained by your fav β¨
okay so bestie, welcome to incrond(8), the manual page for the inotify cron daemon. yes it's section 8, yes it's a daemon, no it's not scary, i promise π«Ά
πΈ NAME πΈ
incrond β inotify cron (incron) daemon. that's it, that's the whole name. short, iconic, does exactly what it says π
β¨ SYNOPSIS β¨
incrond [ -f file ] [ -n | -k ]
look at her. three little things max and she's running your whole filesystem-watching empire π
π DESCRIPTION π
so the inotify cron daemon (incrond) is a daemon that watches filesystem events and executes commands defined in system and user tables. its whole vibe is "generally similar to cron(8)" β like cron's cooler cousin who actually notices things happening π¦
incrond can be started from /etc/rc, /etc/rc.local and so on. it daemonizes itself, which means it returns immediately β so no, you do not need to start it with & and you do not need nohup(1). not me watching people add & for no reason π. it can be run on foreground too if that's your thing.
incrond uses two categories of tables β incrontab(5), go read it, i'll wait π
- System tables are usually located in
/etc/incron.dand are maintained outside of incron (e.g. by various applications). these tables work on root rights level, so literally any file may be watched and commands are executed with root privileges. highkey powerful, so be careful who you give this to π - User tables are located in
/var/spool/incronby default and have names based on user accounts. these tables use the users' access rights, so only files which the user may access are watched. commands are executed with the users' privileges. much more chill, much more safe π
if a table (incrontab) is changed, incrond reacts immediately and reloads the table. currently running child processes (commands) are not affected β they just keep doing their thing, living their truth β¨
there are two files determining whether an user is allowed to use incron. these files have very simple syntax β one user name per line, that's it, no notes:
- if
/etc/incron.allowexists, the user must be noted there to be allowed to use incron. - otherwise if
/etc/incron.denyexists, the user must not be noted there to use incron. - if none of these files exists, there is no other restriction whether anybody may use incron.
the location of these files can be changed in the configuration. slay, configurable π
β οΈ okay so this next part is the serious one, bestie. the daemon itself is currently not protected against looping. if a command executed due to an event causes the same event, it leads to an infinite loop unless a flag mask containing loopable=true is specified. please beware of this and do not allow permission for use incron to unreliable users. fr fr, this is the "i'm not mad, i'm just disappointed" part of the page π
then the options, but like, also described inline here:
the -n (or --foreground) option causes running on foreground. useful especially for testing, debugging and optimization. main character debugging energy π₯
the -k (or --kill) option terminates a running instance of incrond. bye bestie π
the -f <FILE> (or --config=<FILE>) option specifies another location for the configuration file (/etc/incron.conf is used by default).
Environment variables: for system tables, the default (the same as for incrond itself) environment variable set is used. the same applies to root's table. for non-root user tables, the whole environment is cleared and then only these variables are set: LOGNAME, USER, USERNAME, SHELL, HOME and PATH. the variables (except PATH) take values from the user database (e.g. /etc/passwd). the PATH variable is set to:
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
clean slate, no inherited chaos, we love a fresh start πΈ
π¦ SEE ALSO π¦
go read them, they're the supporting cast and they ate π
π BUGS π
incrond is currently not resistent against looping. yes, again. it's in BUGS and in DESCRIPTION. the manpage is nothing if not consistent π
π§ AUTHOR π§
- Andreas Altair Redmer
<altair.ibn.la.ahad.sy@gmail.com>β please report bugs to https://github.com/ar-/incron/issues (this part is literally in the original, i'm not making it up, go report the bugs π«Ά) - Lukas Jelinek
<lukas@aiken.cz>
π COPYING π
This program is free software. It can be used, redistributed and/or modified under the terms of the GNU General Public License, version 2. iconic, legally protected, free π
and that's the whole page!! π written by Lukas Jelinek, version 0.5.12, dated alongside it in the incrond(8) footer β mwah, no cap, she's an icon, periodt π
β¨π
π¦ where this page comes from
- alpine 3.24: incron-doc 0.5.12-r0 Β· GPL-2.0
- arch rolling: incron 0.5.12-7 Β· GPL-2.0-only
- epel 10: incron 0.5.12-28.el10_2 Β· GPL-2.0-only
- epel 9: incron 0.5.12-21.el9 Β· GPLv2
- fedora 43: incron 0.5.12-28.fc43 Β· GPL-2.0-only
- fedora 44: incron 0.5.12-29.fc44 Β· GPL-2.0-only
- nixos 26.05: incron 0.5.12
- nixpkgs unstable: incron 0.5.12
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms