title: incrond running but not executing command under CentOS 6.4
body: <p>I have installed incron from the EPEL repository (before you ask; YES, I also tried downloading the source and compiling locally; same results) and am attempting to set up a process on my CentOS 6.4 (final) virtual box that I have successfully prototyped on my local Ubunto 12.04 machine:</p>
  
  <p>Some information up front:</p>
  
  <ul>
  <li>SELinux is set PERMISSIVE</li>
  <li>I have added my script(s) and called executables to all with NOPASSWD using <code>visudo</code> to get around some permissions issues...</li>
  </ul>
  
  <p>If I invoke my script from the command line with <code>sudo /path/to/my/script.sh arguments</code> it works like a charm.</p>
  
  <p><code>sudo service incrond status</code> verifies that incrond is running. root and myusername are added to <code>/etc/incron.allow</code>, <code>/etc/incron.deny</code> is empty.</p>
  
  <p>My incrotab for root is:</p>
  
  <pre><code>/path/to/dropfolder/ IN_CLOSE_WRITE sudo /path/to/my/script.sh $@/$#
  </code></pre>
  
  <p>Events in <code>/path/to/dropfolder/</code> result in exactly NOTHING happening. No logs are generated, no messages, no actions occur on the files in the folder.</p>
  
  <p>So I have researched: it was suggested that <code>cron</code> runs in a minimal environment and that to execute complex commands/scripts you may have to execute your <code>.bashrc</code> and/or export your PATH at the beginning of the cron command.</p>
  
  <p><strong>Note:</strong> I can find no documentation supporting that <code>incron</code> also runs in a minimal environment, but as my google-fu (and bing-fu!) failed to result in any helpful results related directly to <code>incron</code> I figured WTH, I'll try that!</p>
  
  <p><strong>Edit:</strong> Documentation indicates that <code>incron</code> run from system tables or root takes env from its host enviroment, therefore only <code>incron</code> executed by non-root users should require any sort of env or PATH fiddling</p>
  
  <p>So&hellip; incrontab for root:</p>
  
  <pre><code>/path/to/dropfolder IN_CLOSE_WRITE . /home/myusername/.bashrc; export PATH=$PATH:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin; sudo /path/to/my/script.sh $@/$#"
  </code></pre>
  
  <p>No dice&hellip; tried <code>&amp;&amp;</code> instead of <code>;</code> = no dice. If you can think of a variation on the above I've probably tried it&hellip;</p>
  
  <p>So, lets try a little <code>restorecond -R /usr/sbin/incrond /etc/incron*</code> action!
  Huh, no change there either.
  <code>service incrond stop</code> followed by <code>service incrond start</code> and then <code>service incrond restart</code> &hellip; nope, nope, and nope.</p>
  
  <p>Drastic measures: <code>yum remove incron</code> and <code>yum install incron</code>, <code>chkconfig incrond on</code> and then for good measure a <code>sudo reboot</code>!</p>
  
  <p>Nothing.</p>
  
  <p>I don't even get anything from <code>/tmp/ IN_ALL_EVENTS echo boo&gt;&gt;/home/myusername/boofile.txt</code>, hence my inability to even do an <code>env&gt;&gt;envfile.txt</code> to check whether <code>incron</code> is running in a sparse environment&hellip; (see above note)</p>
  
  <p>And yet: <code>service incrond status</code> yields <code>incrond (pid  xxxx) is running...</code></p>
  
  <p>What am I missing? It has to be big and obvious and I hope someone can make me feel like an idiot in short order! </p>
  
  <p>further examination of <code>/var/log/cron</code> yields results like this: <code>Aug 14 15:05:30 hostname incrond[1584]: (root) CMD (sudo /path/to/DropFolder/script/subfolder/script-Beta-1.sh /home/username/DropFolder/testfile.file)</code> -yes I made sure my script was executable..</p>
  
  <p>so incrond is indeed attempting to do SOMETHING, but I get no output anywhere... even a simple <code>echo &gt; /dev/pts/0</code> produces nada results.</p>
  
  <ul>
  <li>thanks for fixing my crap formatting job </li>
  </ul>