Applications or scripts fail while trying to open /dev/mem

Solution Verified - Updated -


  • When running scripts on our RHEL system, we are getting the below error:
ERROR: Failed to open /dev/mem
  • When running mcelog even as root, it can't open /dev/mem:
mcelog: Cannot open /dev/mem for DMI decoding: Permission denied
  • Permissions seem correct on this device file:
[root@~]# ls -la /dev/mem
crw-r----- 1 root kmem 1, 1 Jan  4 17:07 /dev/mem


  • Red Hat Enterprise Linux 5
  • McAffee LinuxShield Host Intrusion Prevention System

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content