0

I am using incron to monitor one of my file in /var/www/html directory. output of incrontab -l

/var/www/html/test IN_ACCESS /home/intel/test.sh

This job is supposed to create a file in home directory, But when this job got executed (I opened the web address in browser), no file is created, following lines are shown in /var/log/cron file

Jan 20 10:27:57 localhost incrond[26442]: (root) CMD (/home/intel/test.sh)

This clearly shows that event had occurred.

P.S: If I just run a /home/intel/test.sh in CLI its works fine and created test file, following is my test.sh file.

#!/bin/bash
touch fm00
1
  • You're using a relative filename (fm00). Are you sure incron executes in the home directory? Commented Jan 20, 2015 at 17:20

1 Answer 1

0

I've not used (or even heard of incron), but this looks to me like it may be a permissions problem - ie the user who the cron file is run as does not have permission to write to that directory.

Try using "/bintouch /tmp/fm00" as this will eliminate issues with not being able to write to a direcory and also path problems.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .