Why does the following “cat” command fail?

Solution Verified - Updated -

Issue

  • Why cat /proc/self/attr/current returns Invalid argument when SELinux is disabled?
  • With SELinux in disabled mode gives below output :
[nbk15lk@lrchm00dn01 tmp]$  cat /proc/self/attr/current
cat: /proc/self/attr/current: Invalid argument
[nbk15lk@lrchm00dn01 tmp]$ sestatus
SELinux status:                 disabled
  • When in enforcing mode gives below output :
[root@rhel6u7-1 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.8 (Santiago)
[root@rhel6u7-1 ~]# cat /proc/self/attr/current
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

Environment

  • Red Hat Enterprise Linux 6.7
  • Red Hat Enterprise Linux 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.