<div dir="ltr">Thanks so much for the help!<div><br></div><div>Unfortunately that does not do the trick.<br><br><div>/dir/sub/file<br>!/dir/sub</div><div>/dir<br><br>The "/dir/sub/file" is not included with this configuration. The directory "/dir/sub/" is properly *excluded*, and all other subdirs & files in "/dir/" are properly *included*, but the "/dir/sub/file" is not properly *included*. Does Aide just not support this scenario at all?<br></div><div><br></div><div>As mentioned, I've tried double-negating:</div><div><br></div><div>!/dir/sub/[^f]</div><div>/dir</div><div><br></div><div>But this will still include the *directory* "/dir/sub/" (not optimal), and obviously will include *all* files starting with "f" (which is fine in my case, but also not optimal).</div><div><br></div><div>Is there any advantage to upgrading to the latest AIDE version (I am on 0.15.1)?<br><br>Thanks in advance!</div><div><br></div><div>-LN</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 23, 2021 at 6:04 PM Morgan Weetman <<a href="mailto:mweetman@redhat.com">mweetman@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I believe the matching rules should be arranged from most specific at the top to least specific, so maybe try:</div><div><br></div><div>/dir/sub/file<br>!/dir/sub</div><div>/dir</div><div><br></div><div>.. and see if that works?</div><div><br></div><div>hth<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 24 Mar 2021 at 11:44, M <<a href="mailto:linuxntwrk@gmail.com" target="_blank">linuxntwrk@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I need to do the following:</div><div><br></div><div>/dir NORMAL  <--------- include /dir and all its recursive subdirectories/files</div><div>!/dir/sub <------------- *exclude* this one specific subdirectory<br>/dir/sub/file <------------- but *include* this one file in the above-excluded subdirectory</div><div><br></div><div>Unfortunately configuring aide.conf as above does not achieve the results I desire. The negative selection line supersedes the single-file inclusion line below it. This is with AIDE version 0.15.1.<br><br>I've found some other discussions about this (<a href="https://www.ipi.fi/pipermail/aide/2015-November/001504.html" target="_blank">https://www.ipi.fi/pipermail/aide/2015-November/001504.html</a>) but I can't seem to get it working with PCREs in AIDE either (negative lookahead?).<br><br>Even doing something like:</div><div>!

/dir/sub/[^f]</div><div><br>to try to include only files starting with "f" works, but the *directory* itself is then still included, which is no good.</div><div><br></div><div>Goal is: to recursively include all subdirectories, exclude one directory, but *include* a specific file only from the excluded subdirectory.</div><div><br></div><div>Any suggestions/help here? Would be much appreciated!</div><div><br></div><div>Thanks,</div><div>LN</div></div>
_______________________________________________<br>
Aide mailing list<br>
<a href="mailto:Aide@ipi.fi" target="_blank">Aide@ipi.fi</a><br>
<a href="https://www.ipi.fi/mailman/listinfo/aide" rel="noreferrer" target="_blank">https://www.ipi.fi/mailman/listinfo/aide</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span><font color="#888888">Morgan Weetman<br></font></span><span><font color="#888888">Services Content Architect<br>
M: +61 439 469 793<br><a href="https://www.redhat.com/en/services/training-and-certification" target="_blank">https://www.redhat.com/en/services/training-and-certification</a><br></font></span></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
Aide mailing list<br>
<a href="mailto:Aide@ipi.fi" target="_blank">Aide@ipi.fi</a><br>
<a href="https://www.ipi.fi/mailman/listinfo/aide" rel="noreferrer" target="_blank">https://www.ipi.fi/mailman/listinfo/aide</a><br>
</blockquote></div>