Questions tagged [incron]

For the incrontab command and incrond daemon which provide crontab-like tools but for file events using inotify.

incron provides a crontab-like interface to a daemon that looks for inotify events in a filesystem. When they occur, a command can be run. As with cron, there is a system table, and users can each have their own table of events to listen for.

See the man pages for incrontab(1), incrontab(5), incron.conf(5), incrond(8).

14 questions
6
votes
2 answers

User's incrontab not working (only root's) when incrond is run as a service

Here is my incrontab (tony's incrontab): /home/tony/Workspace/cocoonr/ui/static/ui/img/icons/vector IN_MODIFY,IN_CREATE,IN_MOVED_TO /bin/sh /home/tony/Workspace/cocoonr/boilerplate/svg2djangohtml $@/$#…
Antoine Pinsard
  • 121
  • 1
  • 7
3
votes
0 answers

Copying files and folders to /var/www/html - inherit permissions of ./html

I want to enforce web server security and maintain 750 for folders and 640 for files - even when copying, at all times, under all circumstances. So far, I've got this working quite well. This is what I did: sudo chown -R kilomike ./html (Set owner…
Kevin
  • 131
  • 1
2
votes
1 answer

incrontab is not triggering with end of cron sh invokes

I have this incrontab, which is monitoring the master Directory to check if the event occurs where a new file is placed here ... and run the php file. /var/www/html/docs/int/master IN_MOVE php /var/www/html/shscript/work.php I have a crontab that…
2
votes
0 answers

Monitoring directory using incron

I am using incron to monitor the file creation event of a directory. It working fine but once for 4 or 5 days its getting freeze. Once it's freeze, it's not monitoring the file creation event. It started to work back once I manually restarted the…
2
votes
0 answers

Unison and Incron shell script

I have successfully installed unison and incron. I get unison to run just fine. I'm doing this all logged in as root by the way, I figure that's how this will be executed when i'm not logged in. I'm using ssh, and have a passwordless key file. I can…
aibarra
  • 121
  • 1
1
vote
1 answer

incrontab: modify a modified file

With incrontab, I want to monitor a file and whenever it gets modified, I want to replace a string in it. But that will create an infinite loop, I guess. When I configure it with the following table: /etc/file.md IN_MODIFY sed -i 's/Hello/Hi/g'…
stackprotector
  • 400
  • 2
  • 3
  • 17
1
vote
1 answer

incrontab on folder name containing line feeds

I'm writing a script searching for directories in a subtree and appending them to incrontab. I can even add folder names with blanks by escaping those with a backslash: /path/to/observed\ directory IN_ALL_EVENTS /path/to/script.sh "\$@" "\$#"…
Pinke Helga
  • 321
  • 1
  • 2
  • 10
1
vote
2 answers

Allow one entry at a time in incron job?

I have a directory to monitor. When it is updated, I run some command via incron. When multiple files are copied in this directory, incron execute multiple commands at the same time. Is there any way that when one job of incron is running, the…
1
vote
1 answer

Incrontab does not execute command

When I use incrontab out of the box, I mean no changes, I get no result, as if the command was not executed. my incron line is : /crrae IN_CREATE,IN_CLOSE_WRITE,IN_MOVED_TO /usr/bin/unix2dos $# the log give information as if everything was ok but no…
0
votes
0 answers

Ubuntu: User 'uname' is not allowed to use [tool]

I found this cool tool called "incron." I think it will be a great productivity booster, but I am having issues getting it to run. sudo apt-get install incron ... Adding group `incron' ... sudo usermod -a -G incron myname # no luck incrontab -e #…
Chris
  • 894
  • 5
  • 18
0
votes
2 answers

How to do find and replace strings on file after it is being modified

Trying to achieve following: 1) New file gets uploaded with the same file name but with new content 2) Event triggers that checks the file for specific strings and replaces them 3) The file can be saved in place(might be a loop) or new copy of the…
0
votes
1 answer

Errors on trigger of incrond scripts

I have incron installed on my centos 7 machine. for my initial testing, I have a simple entry in the table. When a file is moved to the target folder, it would run a script. What I did first was to execute /dir IN_MOVED_TO logger success This does…
chip
  • 153
  • 1
  • 3
  • 11
0
votes
0 answers

abrt-server sent an email to root@localhost, but there are no updates in var/mail/root

I'm debugging an issue with python and incron, when I run my script, and then checking the status, it says it has an error. then it said it sent an email to root@localhost, I'm assuming this is at /var/mail/root? When I check that file though, the…
chip
  • 153
  • 1
  • 3
  • 11
0
votes
1 answer

Incrontab / Incron on Cygwin

Does anyone please know if it is possible to install incron/incrontab within Cygwin? I've had a look and the package does not appear on the cygwin website, I wondered if anyone had tried, knew of any method or had any success?
questions
  • 3
  • 1