LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-18-2009, 11:29 PM   #1
abefroman
Senior Member
 
Registered: Feb 2004
Location: Chicago
Distribution: CentOS
Posts: 1,277

Rep: Reputation: 53
Help with aide.conf file syntax


I am trying to match images, the following works:
!@@{TOPDIR}/public_html/cache/thumbnail/article_small/.*\.jpg$

The following does not work:
!@@{TOPDIR}/public_html/cache/thumbnail/article_small/[a-zA-Z0-9]*\.jpg$
!@@{TOPDIR}/public_html/cache/thumbnail/article_small/.*\.[jpg|JPG]$
!@@{TOPDIR}/public_html/cache/thumbnail/article_small/.*\.[jpg|JPG]+$
!@@{TOPDIR}/public_html/cache/thumbnail/article_small/.*\.[jpgJPG]$
!@@{TOPDIR}/public_html/cache/thumbnail/article_small/.*\.[jJ][pP][gG]$

(I also tried replacing @@{TOPDIR} with /home/myusername

According to the aide manual: http://www.cs.tut.fi/~rammer/aide/manual.html
the [a-zA-Z0-9] syntax should be allowed:

From the manual:
Quote:
However since the negative selection rules are checked last and .* can match to an empty string /var/log/messages is not added to the database. The following is a more correct way of doing it.

/ R
=/var/log/messages$ R+a
!/var/log/messages\.[0-9]$
Does anyone know why its not matching my patterns?

TIA
 
Old 08-19-2009, 05:57 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,558
Blog Entries: 54

Rep: Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927
I know "!@@{TOPDIR}/path/.*[endmarker|ENDMARKER]$"-style globs work. Post your config?
 
Old 08-19-2009, 08:51 AM   #3
abefroman
Senior Member
 
Registered: Feb 2004
Location: Chicago
Distribution: CentOS
Posts: 1,277

Original Poster
Rep: Reputation: 53
Here's my config:
Code:
@@define TOPDIR /home/abefroman

@@ifndef TOPDIR
@@define TOPDIR ./
@@endif

@@ifdef DEBUG
@@define DEBUG ison
@@undef NOT_DEBUG
@@else
@@define NOT_DEBUG true
@@undef DEBUG
@@endif

@@ifhost korppi
@@define KORPPI yes
@@endif

@@ifnhost ftp
@@define BUMMER true
@@endif

# The location of the database to be read.
database=file:@@{TOPDIR}/aide.db.in

# The location of the database to be written.
database_out=file:@@{TOPDIR}/aide.db.out


verbose=20

report_url=stdout

MD=md5

#Selection regexp rule
@@{TOPDIR}/public_html MD
!@@{TOPDIR}/public_html/forums/vbseo_sitemap/data/hits/[0-9]*.log?
!@@{TOPDIR}/public_html/cache/cache_[a-f0-9]*
!@@{TOPDIR}/public_html/cache/thumbnail/article_small/[a-zA-Z0-9]*\.[jpg|JPG]$
 
Old 08-19-2009, 11:39 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,558
Blog Entries: 54

Rep: Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927
Works for me like this with Aide-0.13.1:
Code:
@@define TOPDIR /home/abefroman
database=file:/tmp/aide.db.in
database_out=file:/tmp/aide.db.out
verbose=20
report_url=stdout
MD=md5

#Selection regexp rule
@@{TOPDIR}/public_html MD
!@@{TOPDIR}/public_html/forums/vbseo_sitemap/data/hits/.*[0-9]*.log?
!@@{TOPDIR}/public_html/cache/cache_[a-f0-9]*
!@@{TOPDIR}/public_html/cache/thumbnail/article_small/.*[a-zA-Z0-9].*.[jpg|JPG]$
 
Old 09-20-2009, 09:22 PM   #5
abefroman
Senior Member
 
Registered: Feb 2004
Location: Chicago
Distribution: CentOS
Posts: 1,277

Original Poster
Rep: Reputation: 53
Quote:
Originally Posted by unSpawn View Post
.*[a-zA-Z0-9].*.[jpg|JPG]$
Why is the .* is needed before [a-zA-Z0-9]?
and a .* after
as opposed to just [a-zA-Z0-9]*.[jpg|JPG]$?

From what I understand [a-zA-Z0-9]*.[jpg|JPG]$ means
[a-zA-Z0-9] = any letter or number
* = 0 or more times
.[jpg|JPG] = .jpg or .JPG
$ = end string

TIA
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please Help Syntax Error in named.conf file Owiza007 Linux - Networking 4 05-06-2009 07:41 AM
Starting httpd: httpd: Syntax error on line 209 of /etc/httpd/conf/httpd.conf: Syntax sethukpathi Linux - Networking 6 04-12-2008 12:26 PM
Can someone post a sample aide.conf file here? For AIDE IDS abefroman Linux - Security 9 04-12-2008 09:18 AM
aide.conf example? linuxhippy Linux - Security 12 11-02-2006 05:45 AM
aide conf f1uke Linux - Security 1 07-29-2003 08:38 PM


All times are GMT -5. The time now is 04:23 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration