Skip to content

Instantly share code, notes, and snippets.

@hmen97
Last active March 15, 2021 12:53
Show Gist options
  • Save hmen97/8ecb494ad866469da3fc684ff3a669be to your computer and use it in GitHub Desktop.
Save hmen97/8ecb494ad866469da3fc684ff3a669be to your computer and use it in GitHub Desktop.
When you get permission denied while closing a docker container
Check status: sudo aa-status
Shutdown and prevent it from restarting: sudo systemctl disable apparmor.service --now
Unload AppArmor profiles: sudo service apparmor teardown
Check status: sudo aa-status
You should now be able to stop/kill containers.
Postman
systemctl status apparmor
# "Yup, dead apparmor"
systemctl restart apparmor
snap restart lxd
Commands to make the login work awfis
sudo apt-get install dnsmasq
sudo systemctl stop systemd-resolved
sudo systemctl disable p systemd-resolved
sudo systemctl disable systemd-resolved
systemctl status dnsmasq
sudo systemctl stop dnsmasq
sudo systemctl start dnsmasq
sudo nano /etc/NetworkManager/NetworkManager.conf
sudo systemctl restart NetworkManager
sudo mv /etc/resolv.conf /etc/resolv.conf.bak
sudo ln -s /var/run/NetworkManager/resolv.conf /etc/resolv.conf
sudo systemctl restart NetworkManager
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment