DEV Community

feng wei
feng wei

Posted on

Ubuntu 22.04: Browser Not Working After Hardening

I notice that web browsers, like Firefox and Chrome, will cease functioning after applying Ubuntu security guide - level1_workstation in some Ubuntu 22.04.

Error is like as following:

snap-confine has elevated permissions and is not confined but should be. Refusing to continue to avoid permission escalation attacks. Please make sure that the snapd.apparmor service is enabled and started.

I am pretty sure that "snapd.apparmor service is enabled and started" after a quick check. With some Google research, i believe the issue is caused by a Linux Security Module called AppArmor, which restricts applications' capabilities and permissions with profiles that are set per-program. You can find more info about it here.

In short, AppArmor profiles have two modes of operation:

Complaining/Learning: profile violations are permitted and logged. This is useful for testing and developing new profiles.

Enforced/Confined: enforces profile policy in addition to logging the violation.

To solve the issue, we can set all profiles modes to "Enforced".

sudo aa-enforce /etc/apparmor.d/*
Enter fullscreen mode Exit fullscreen mode

To verify profiles status, fire command "sudo aa-status"

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay