python script not work with incron
<pre><code>incrontab -e
/home/owen/file_to_be IN_ALL_EVENTS /home/owen/abc.py 

owen@desktop:~$ cat abc.py 
#!/usr/bin/env python
# -*- coding: utf-8 -*-
p = open('file_to_test', 'a+')
p.write("test")
p.close()

owen@desktop:~$ ll file_to_test file_to_be 
-rw-r--r-- 1 owen owen 32 2012-04-27 17:07 file_to_be
-rw-r--r-- 1 owen owen 60 2012-04-27 17:07 file_to_test

owen@desktop:~$ echo "a" &gt;&gt; file_to_be 
owen@desktop:~$ ll file_to_test file_to_be 
-rw-r--r-- 1 owen owen 34 2012-04-27 17:15 file_to_be
-rw-r--r-- 1 owen owen 60 2012-04-27 17:07 file_to_test


owen@desktop:~$ tail -n 3 /var/log/syslog
Apr 27 17:15:01 owen1 CRON[12003]: (root) CMD (command -v debian-sa1 &gt; /dev/null &amp;&amp; debian-sa1 1 1)
Apr 27 17:15:10 owen1 incrond[11574]: table for user owen changed, reloading
Apr 27 17:15:18 owen1 incrond[11574]: (owen) CMD (/home/owen/abc.py)
</code></pre>

<p>It seems incron has been triggered</p>

<p>But the python script didn`t work as expect.</p>

<p>Anyone know why?</p>

<p>If I execute abc.py, it will append "test" to file correct.</p>
