1

I set up a fresh debian 11 installation and installed tor to fiddle around with hidden services. Since its only a test machine I decided to uninstall apparmor since I dont need any security on that machine.

So after a systemctl stop apparmor and a systemctl disable apparmor I also removed app armor completely usingapt remove --assume-yes --purge apparmor. Then I rebootet the system.

After rebooting it I tried to start my hidden service again but in /var/log/syslog I still see that apparmore somehow blocks the appilcation?

May 15 10:14:35 debian tor[1394]: May 15 10:14:35.791 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://support.torproject.org/faq/staying-anonymous/
May 15 10:14:35 debian tor[1394]: May 15 10:14:35.791 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc".
May 15 10:14:35 debian tor[1394]: May 15 10:14:35.791 [notice] Read configuration file "/etc/tor/torrc".
May 15 10:14:35 debian tor[1394]: Configuration was valid
May 15 10:14:35 debian kernel: [  872.927211] audit: type=1400 audit(1652624075.840:22): apparmor="DENIED" operation="change_onexec" info="label not found" error=-2 profile="unconfined" name="system_tor" pid=1395 comm="(tor)"

Does anyone know where this is comming from? How do I get rid of apparmor completely?

1 Answer 1

0

This is what I've done:

apt-get -y -f purge apparmor
apt-mark -y hold apparmor
rm -rf /var/cache/apparmor
rm -rf /etc/apparmor.d
cat > /etc/apt/apt.conf.d/01autoremove << END
APT
{
  NeverAutoRemove
  {
        "^firmware-linux.*";
        "^linux-firmware$";
        "^linux-image-[a-z0-9]*$";
        "^linux-image-[a-z0-9]*-[a-z0-9]*$";
  };

  VersionedKernelPackages
  {
        # kernels
        "linux-.*";
        "kfreebsd-.*";
        "gnumach-.*";
        # (out-of-tree) modules
        ".*-modules";
        ".*-kernel";
  };

  Never-MarkAuto-Sections
  {
        "metapackages";
        "contrib/metapackages";
        "non-free/metapackages";
        "restricted/metapackages";
        "universe/metapackages";
        "multiverse/metapackages";
        "apparmor*";
  };

  Move-Autobit-Sections
  {
        "oldlibs";
        "contrib/oldlibs";
        "non-free/oldlibs";
        "restricted/oldlibs";
        "universe/oldlibs";
        "multiverse/oldlibs";
  };
};
END
apt-get -y update
apt-get -y autoremove
apt-get -y autoclean

Hope it helps!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .