AA-NOTIFY(8) AppArmor AA-NOTIFY(8)

aa-notify - نمایش اعلان‌های پیام‌های ثبت‌شده AppArmor

aa-notify [گزینه]

دستور aa-notify خلاصه‌ای از وضعیت را نمایش می‌دهد یا برای پیام‌های DENIED (رد شده) AppArmor اعلان‌های میزکار ارائه می‌کند.

دستور aa-notify آرگومان‌های زیر را می‌پذیرد:

بررسی مداوم (poll) لاگ‌های AppArmor و نمایش اعلان‌های میزکار. می‌تواند همراه با گزینه '-s' برای نمایش خلاصه در زمان راه‌اندازی استفاده شود.
تنظیم متغیر محیطی DISPLAY روی $DISPLAY (در صورتی که sudo متغیر $DISPLAY را بازنشانی کند ممکن است لازم باشد).
جستجوی FILE برای یافتن پیام‌های AppArmor.
نمایش خلاصه از زمان آخرین ورود به سیستم.
نمایش خلاصه برای NUM روز گذشته.
کاربری که هنگام اجرای دارای امتیاز، امتیازات به آن کاهش می‌یابد. هنگام استفاده با گزینه -p، این مقدار باید روی کاربری تنظیم شود که اعلان‌های میزکار را دریافت خواهد کرد. این گزینه هنگام اجرا تحت sudo هیچ اثری ندارد.
صبر کردن به مدت NUM ثانیه پیش از نمایش اعلان‌ها (برای استفاده همراه با -p).
نمایش پیام‌ها به همراه خلاصه‌ها با جزئیات بیشتر.
نمایش راهنمای کوتاه نحوه استفاده.

پیکربندی سراسری سیستم برای aa-notify از طریق مسیر /etc/apparmor/notify.conf انجام می‌شود:

# Set to 'no' to disable AppArmor notifications globally
show_notifications="yes"
# Special profiles used to remove privileges for unconfined binaries using user namespaces. If unsure, leave as is.
userns_special_profiles="unconfined,unprivileged_userns"
# Theme for aa-notify GUI. See https://ttkthemes.readthedocs.io/en/latest/themes.html for available themes.
interface_theme="ubuntu"
# Binaries for which we ignore userns-related capability denials
ignore_denied_capability="sudo,su"
# OPTIONAL - kind of operations which display a popup prompt.
prompt_filter="userns"
# OPTIONAL - restrict using aa-notify to users in the given group
# (if not set, everybody who has permissions to read the logfile can use it)
# use_group="admin"
# OPTIONAL - custom notification message body
message_body="This is a custom notification message."
# OPTIONAL - custom notification message footer
message_footer="For more information visit https://foo.com"
# OPTIONAL - custom notification filtering
# Filters are used to reduce the output of information to only those entries that will match the filter. Filters use Python's regular expression syntax.
filter.profile="^(foo|bar)$"  # Match the profile:            Only shows notifications for profiles "foo" or "bar"
filter.operation="^open$"     # Match the operation:          Only shows notifications for "open" operation
filter.name="^(?!/usr/lib/)"  # Match the name:               Excludes notifications for names starting by "/usr/lib/"
filter.denied="^r$"           # Match the denied_mask:        Only shows notifications where "r", and only "r", was denied
filter.family="^inet$"        # Match the network family:     Only shows notifications for "inet" family
filter.socket="stream"        # Match the network socket type: Only shows notifications for "stream" sockets

پیکربندی برای هر کاربر از طریق $XDG_CONFIG_HOME/apparmor/notify.conf (یا مسیر منسوخ‌شده ~/.apparmor/notify.conf در صورت وجود) انجام می‌شود:

# set to 'yes' to enable AppArmor DENIED notifications
show_notifications="yes"

دستور aa-notify باید بتواند فایل‌های لاگ حاوی پیام‌های DENIED مربوط به AppArmor را بخواند.

اگر اشکالات دیگری پیدا کردید، لطفاً آن‌ها را در گیت‌لب گزارش دهید: https://gitlab.com/apparmor/apparmor/-/issues

apparmor(7)

2026-03-10 AppArmor 4.1.7