From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Grubb Subject: Re: help needed: how to exclude a single file from being audited. Date: Wed, 7 Sep 2011 08:05:36 -0400 Message-ID: <201109070805.36752.sgrubb@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: linux-audit@redhat.com List-Id: linux-audit@redhat.com On Wednesday, September 07, 2011 12:47:53 AM Vipin Rathor wrote: > I've a situation here. I've put a watch on a directory (e.g. -w /etc). > Due to this, every action on files under this directory are being > audited. > Now I want to exclude a single file in that directory (e.g. > /etc/sysconfig/bash-prompt-xterm), how should I do that? > I tried something like this in my exclude list: > -a exclude,never -F path=/etc/sysconfig/bash-prompt-xterm > > But got this error: > Only msgtype field can be used with exclude filter > > Any idea, how to exclude a single file from a 'watched' directory? Path fields must be on the exit filter. Try: -a exit,never -F path=/etc/sysconfig/bash-prompt-xterm And this must be before the rule on the directory. Note that this is kernel version dependent. There was a bug sometime ago where the kernel was not preserving the ordering of file system watches and the never rules didn't work. -Steve