<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://it-arts.net/index.php?action=history&amp;feed=atom&amp;title=APPARMOR_-_Base_Documentation</id>
	<title>APPARMOR - Base Documentation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://it-arts.net/index.php?action=history&amp;feed=atom&amp;title=APPARMOR_-_Base_Documentation"/>
	<link rel="alternate" type="text/html" href="https://it-arts.net/index.php?title=APPARMOR_-_Base_Documentation&amp;action=history"/>
	<updated>2026-05-02T18:42:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://it-arts.net/index.php?title=APPARMOR_-_Base_Documentation&amp;diff=900&amp;oldid=prev</id>
		<title>Admin: Text replacement - &quot;Category:Wiki&quot; to &quot;Category:Wiki

&#039;&#039;&#039;&#039;&#039;[https://it-arts.net/index.php/Category:Wiki Return to Wiki Index]&#039;&#039;&#039;&#039;&#039;
&quot;</title>
		<link rel="alternate" type="text/html" href="https://it-arts.net/index.php?title=APPARMOR_-_Base_Documentation&amp;diff=900&amp;oldid=prev"/>
		<updated>2026-01-17T07:07:54Z</updated>

		<summary type="html">&lt;p&gt;Text replacement - &amp;quot;&lt;a href=&quot;/index.php/Category:Wiki&quot; title=&quot;Category:Wiki&quot;&gt;Category:Wiki&lt;/a&gt;&amp;quot; to &amp;quot;&lt;a href=&quot;/index.php/Category:Wiki&quot; title=&quot;Category:Wiki&quot;&gt;Category:Wiki&lt;/a&gt;  &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[https://it-arts.net/index.php/Category:Wiki Return to Wiki Index]&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &amp;quot;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:07, 17 January 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Wiki]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Wiki]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;&#039;&#039;[https://it-arts.net/index.php/Category:Wiki Return to Wiki Index]&#039;&#039;&#039;&#039;&#039;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Managing AppArmor Profiles ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Managing AppArmor Profiles ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://it-arts.net/index.php?title=APPARMOR_-_Base_Documentation&amp;diff=744&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;Category:Wiki  === Managing AppArmor Profiles ===  AppArmor uses profiles to define the access controls for programs. These profiles specify what resources (such as files, network ports, etc.) a program can access and what actions it can perform. Profiles are written in a human-readable format and can be customized to suit the needs of specific applications.  ==== Viewing AppArmor Status ====  To check the status of AppArmor on your system, use the following command:...&quot;</title>
		<link rel="alternate" type="text/html" href="https://it-arts.net/index.php?title=APPARMOR_-_Base_Documentation&amp;diff=744&amp;oldid=prev"/>
		<updated>2026-01-05T19:31:44Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/index.php/Category:Wiki&quot; title=&quot;Category:Wiki&quot;&gt;Category:Wiki&lt;/a&gt;  === Managing AppArmor Profiles ===  AppArmor uses profiles to define the access controls for programs. These profiles specify what resources (such as files, network ports, etc.) a program can access and what actions it can perform. Profiles are written in a human-readable format and can be customized to suit the needs of specific applications.  ==== Viewing AppArmor Status ====  To check the status of AppArmor on your system, use the following command:...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Wiki]]&lt;br /&gt;
&lt;br /&gt;
=== Managing AppArmor Profiles ===&lt;br /&gt;
&lt;br /&gt;
AppArmor uses profiles to define the access controls for programs. These profiles specify what resources (such as files, network ports, etc.) a program can access and what actions it can perform. Profiles are written in a human-readable format and can be customized to suit the needs of specific applications.&lt;br /&gt;
&lt;br /&gt;
==== Viewing AppArmor Status ====&lt;br /&gt;
&lt;br /&gt;
To check the status of AppArmor on your system, use the following command:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo apparmor_status&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command provides a summary of the current state of AppArmor, including the number of enforced, complain, and disabled profiles, along with their associated applications.&lt;br /&gt;
&lt;br /&gt;
==== Listing Profiles ====&lt;br /&gt;
&lt;br /&gt;
To list all available AppArmor profiles, use:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo aa-status&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will display the current AppArmor profiles, indicating which are in &amp;quot;enforce&amp;quot; mode (actively restricting applications) and which are in &amp;quot;complain&amp;quot; mode (only logging policy violations).&lt;br /&gt;
&lt;br /&gt;
==== Loading and Unloading Profiles ====&lt;br /&gt;
&lt;br /&gt;
You can load or unload AppArmor profiles with the following commands:&lt;br /&gt;
&lt;br /&gt;
* To load a profile:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo apparmor_parser -r /etc/apparmor.d/&amp;lt;profile_name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To unload a profile:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo apparmor_parser -R /etc/apparmor.d/&amp;lt;profile_name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The `-r` flag reloads a profile, while the `-R` flag removes it from the system.&lt;br /&gt;
&lt;br /&gt;
==== Editing Profiles ====&lt;br /&gt;
&lt;br /&gt;
AppArmor profiles are typically located in the `/etc/apparmor.d/` directory. To edit a profile, use any text editor:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo nano /etc/apparmor.d/&amp;lt;profile_name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you have edited the profile, reload it to apply the changes:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo apparmor_parser -r /etc/apparmor.d/&amp;lt;profile_name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Creating a New Profile ====&lt;br /&gt;
&lt;br /&gt;
To create a new AppArmor profile for an application, use the following steps:&lt;br /&gt;
&lt;br /&gt;
* Generate a profile using the `aa-genprof` tool:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo aa-genprof &amp;lt;application_name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Follow the interactive prompts to set up the profile. The tool will help create a basic profile based on the program&amp;#039;s current behavior.&lt;br /&gt;
&lt;br /&gt;
* Once the profile is generated, edit it to fine-tune the permissions and constraints according to your security needs.&lt;br /&gt;
&lt;br /&gt;
* Finally, load the new profile:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo apparmor_parser -r /etc/apparmor.d/&amp;lt;profile_name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== AppArmor Modes ===&lt;br /&gt;
&lt;br /&gt;
AppArmor operates in different modes, each with a specific level of enforcement. The two primary modes are &amp;quot;enforce&amp;quot; and &amp;quot;complain.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Enforce Mode ====&lt;br /&gt;
&lt;br /&gt;
In enforce mode, AppArmor actively enforces the security policy defined in the profile. Any access request that violates the profile will be denied, and an event will be logged.&lt;br /&gt;
&lt;br /&gt;
To switch a profile to enforce mode, use the following command:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo aa-enforce /etc/apparmor.d/&amp;lt;profile_name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Complain Mode ====&lt;br /&gt;
&lt;br /&gt;
In complain mode, AppArmor does not block any access but logs policy violations. This mode is useful for debugging or testing profiles without risking disruption to the application.&lt;br /&gt;
&lt;br /&gt;
To switch a profile to complain mode, use:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo aa-complain /etc/apparmor.d/&amp;lt;profile_name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Disabled Mode ====&lt;br /&gt;
&lt;br /&gt;
Profiles can be disabled entirely, which means AppArmor will not enforce or log any policy violations for the program. This mode is typically not recommended for security but may be useful for troubleshooting.&lt;br /&gt;
&lt;br /&gt;
To disable a profile:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo aa-disable /etc/apparmor.d/&amp;lt;profile_name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting AppArmor ===&lt;br /&gt;
&lt;br /&gt;
When AppArmor is causing issues, troubleshooting is required to identify the cause and resolve it.&lt;br /&gt;
&lt;br /&gt;
==== Common AppArmor Issues ====&lt;br /&gt;
&lt;br /&gt;
* **Application Crashes or Failures Due to AppArmor**:&lt;br /&gt;
  If an application fails to start or behaves incorrectly after AppArmor enforcement, check the logs to identify which operation was blocked. You can view AppArmor logs by inspecting the system log files:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo less /var/log/syslog | grep apparmor&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Look for lines indicating &amp;quot;DENIED&amp;quot; or &amp;quot;ALLOWED&amp;quot; and examine what actions are being blocked.&lt;br /&gt;
&lt;br /&gt;
* **Missing Permissions in Profiles**:&lt;br /&gt;
  If the application is being denied access to necessary resources, you may need to update its profile to allow specific permissions. For example, if an application requires access to a specific directory, add the following to its profile:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
/path/to/directory/** rw,&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  This grants read and write permissions to the directory.&lt;br /&gt;
&lt;br /&gt;
* **Profile is in Complain Mode**:&lt;br /&gt;
  If AppArmor is not blocking an action but is only logging it, the profile may be in complain mode. To switch the profile to enforce mode, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo aa-enforce /etc/apparmor.d/&amp;lt;profile_name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* **Check Profile Syntax**:&lt;br /&gt;
  If there are syntax errors in an AppArmor profile, it may prevent it from loading properly. Use the following command to check for syntax issues:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo apparmor_parser -r /etc/apparmor.d/&amp;lt;profile_name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  If errors are detected, fix them in the profile file and reload the profile.&lt;br /&gt;
&lt;br /&gt;
==== Reverting Changes in AppArmor ====&lt;br /&gt;
&lt;br /&gt;
If you&amp;#039;ve made changes to a profile that are causing issues, you can revert to the default version by removing the custom profile and reloading the default one.&lt;br /&gt;
&lt;br /&gt;
To remove a custom profile:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo rm /etc/apparmor.d/&amp;lt;profile_name&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, reload the default profile or use the `aa-genprof` tool to regenerate it.&lt;br /&gt;
&lt;br /&gt;
=== Useful Links ===&lt;br /&gt;
&lt;br /&gt;
* [Official AppArmor Documentation](https://gitlab.com/apparmor/apparmor)&lt;br /&gt;
* [AppArmor Wiki on Ubuntu](https://wiki.ubuntu.com/AppArmor)&lt;br /&gt;
* [AppArmor Manual Pages](http://man7.org/linux/man-pages/man7/apparmor.7.html)&lt;br /&gt;
* [AppArmor GitHub Repository](https://github.com/apparmor/apparmor)&lt;br /&gt;
* [AppArmor Community Forum](https://discourse.ubuntu.com/c/security/apparmor/)&lt;br /&gt;
* [AppArmor and SELinux Comparison](https://wiki.archlinux.org/title/AppArmor#AppArmor_vs_SELinux)&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>