# AuditD module - right usage and syntax of -q flag in auditd rules

**URL:** <https://discuss.elastic.co/t/auditd-module-right-usage-and-syntax-of-q-flag-in-auditd-rules/315009>\
**Category:** Beats\
**Tags:** auditbeat\
**Created:** [September 23, 2022, 10:52am UTC](https://discuss.elastic.co/t/auditd-module-right-usage-and-syntax-of-q-flag-in-auditd-rules/315009 "2022-09-23T10:52:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lukas\_Hubl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_hubl/32/100118_2.png) [@Lukas\_Hubl](https://discuss.elastic.co/u/Lukas_Hubl)\
**Post date:** [September 23, 2022, 10:52am UTC](https://discuss.elastic.co/t/auditd-module-right-usage-and-syntax-of-q-flag-in-auditd-rules/315009/1 "2022-09-23T10:52:19Z")

</div>

Hi,  
I would like to use -q flag in auditd rule, but the rule with the -q flag is not working or even added into the rules list.  
I have rule like this:  
`-a always,exit -F path=/home/lukashubl/ -q /home/lukashubl/dirtest,/home/lukashubl/dirtest/bin -F perm=rwxa`  
I am using auditbeat and I am getting this error:  
`flag provided but not defined: -q accessing '0'`  
I also tried to test the rule with auditctl: `auditctl -a always,exit -F path=/home/lukashubl/ -q /home/lukashubl/dirtest,/home/lukashubl/dirtest/bin -F perm=rwxa`  
But when I list all rules by `auditcl -l`, the rule is not there and no error at output.

What is the right syntax and usage of -q flag in auditd rule?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 21, 2022, 12:52pm UTC](https://discuss.elastic.co/t/auditd-module-right-usage-and-syntax-of-q-flag-in-auditd-rules/315009/2 "2022-10-21T12:52:41Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
