Don’t worry, it still works, it has just become a privileged operation, and it works fine with sudo dmesg. But why the change?
Well, I happen to be the one who proposed for this change to be made, and followed up on getting the configuration changes made. This blog post will describe how it slightly improves the security of Ubuntu, and the journey to getting the changes landed in a release.
Matthew Ruffell
Sustaining Engineer @ Canonical.
https://ruffell.nz/programming/writeups/2020/10/24/getting-dmesg-restrict-enabled-in-ubuntu-groovy.html
https://www.phoronix.com/news/Ubuntu-20.10-Restrict-dmesg
Why should users have access to dmesg if they can't access /var/log/kern.log?
https://lists.ubuntu.com/archives/ubuntu-devel/2020-June/041063.html
For those interested this new default restriction can be turned off with
sudo sysctl kernel.dmesg_restrict=0
sysctl kernel.dmesg_restrict
kernel.dmesg_restrict = 1
ls -l /var/log/dmesg*
-rw-r----- 1 root adm 83674 Sep 20 07:56 /var/log/dmesg
-rw-r----- 1 root adm 85387 Sep 20 07:06 /var/log/dmesg.0
-rw-r----- 1 root adm 20186 Sep 19 20:55 /var/log/dmesg.1.gz
-rw-r----- 1 root adm 20637 Sep 19 20:50 /var/log/dmesg.2.gz
-rw-r----- 1 root adm 20154 Sep 19 09:40 /var/log/dmesg.3.gz
-rw-r----- 1 root adm 20840 Sep 19 04:57 /var/log/dmesg.4.gz