Note for English Readers

If I write the articles in Indonesian, I will write a summary in English so that you can read my articles too. After you read the summary and you feel that you need more information about that, please do not hesitate to contact me via e-mail that can be found in my profile.

Thank you for reading my blogs.

Saturday, March 12, 2011

dmesg: operation not permitted as user

After upgrading to Slackware64 13.37, I cannot access the kernel syslog (dmesg) as user. This problem is caused by kernel ( setting in Slackware (see pictures below).

There are 2 solutions, you are freely to choose one of them.

Solution 1: add these lines on your rc.local:
if [ -r /proc/sys/kernel/dmesg_restrict ]; then
    if [ $(cat /proc/sys/kernel/dmesg_restrict) = 1 ]; then
        echo 0 > /proc/sys/kernel/dmesg_restrict

Solution 2: change the correspond kernel setting (restrict unprivileged access to the kernel syslog) to "N" then recompile the kernel.


Willy Sudiarto Raharjo said...

luckily i compiled my own kernel :)

Henry Hermawan said...

He... he...
Actually, I compiled my own kernel also. However, I always make slackware kernel configuration as my reference and change a little bit for my laptop. Unfortunately, I could not detect this problem before I compiled the kernel, so, it showed up.