<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">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" class="gmail_signature"><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>