help needed: how to exclude a single file from being audited.

Vipin Rathor v.rathor at gmail.com
Thu Sep 8 05:38:41 UTC 2011


Hi Steve,
Thank you for reply.
That worked !


On Wed, Sep 7, 2011 at 5:35 PM, Steve Grubb <sgrubb at redhat.com> wrote:
> 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
>



-- 
-Rathor




More information about the Linux-audit mailing list