<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"></p>
<div>Hi AppArmor Community,</div>
<div><br>
</div>
<div>I'm running Ubuntu 18.04.1 LTS</div>
<div><br>
</div>
<div>I'm trying to create an apache2 profile in AppArmor but when I run aa-genprof and try to hit my Drupal website to scan in processes for the profile my website breaks while the profile is scanning in complain mode. Here is the syslog line that is thrown:</div>
<div><br>
</div>
<div>Dec 29 07:21:41 ip-172-31-9-2 kernel: [225623.487271] audit: type=1400 audit(1546068101.318:6846): apparmor="ALLOWED" operation="connect" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/apache2" name="run/mysqld/mysqld.sock"
 pid=30086 comm="apache2" requested_mask="wr" denied_mask="wr" fsuid=33 ouid=106</div>
<div><br>
</div>
<div>Here is the user.sbin.apache2 AppArmor config that aa-genprof created</div>
<div><br>
</div>
<div>    # Last Modified: Sat Dec 29 03:30:28 2018</div>
<div>    #include <tunables/global></div>
<div><br>
</div>
<div>    /usr/sbin/apache2 flags=(attach_disconnected,complain) {</div>
<div>      #include <abstractions/base></div>
<div>      #include <abstractions/lxc/container-base></div>
<div>      #include <abstractions/lxc/start-container></div>
<div><br>
</div>
<div>      ^DEFAULT_URI flags=(complain) {</div>
<div>      }</div>
<div><br>
</div>
<div>      ^HANDLING_UNTRUSTED_INPUT flags=(complain) {</div>
<div>      }</div>
<div>    }</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>To get the webserver back I have to disable the apache2 profile...I've tried correcting the apparmore apache2 profile with aa-logprof but that does not work. </div>
<div><br>
</div>
<div>If you have a working apache2 config for Ubuntu 18.04.1 LTS please share it. Thanks.</div>
<br>
<p></p>
<p style="margin-top:0;margin-bottom:0">NOTE: I was following the instructions given by Sean Mancini on this youtube video...it almost worked...almost!</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><a href="https://www.youtube.com/watch?v=zPkrcTidwQI" class="OWAAutoLink" id="LPlnk517048" previewremoved="true">https://www.youtube.com/watch?v=zPkrcTidwQI</a><br>
<br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, Helvetica, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div><br>
</div>
<div>****************<br>
David Moody       </div>
<div><br>
</div>
<div><br>
</div>
<div></div>
</div>
</div>
</div>
</body>
</html>